functions.php<?php /** * PLEASE NOTE THIS CODE IS UNTESTED AND IS ONLY MEANT TO BE USED AS A STARTING POINT !!! * * CODE STILL NEEDS TO BE ADDED TO REMOVE OR PREVENT THE PASSWORD AND USER FIELDS FROM BEING SAVED TO THE LISTING!! * I MAY JUST END UP TURNING THIS INTO AN OPEN […]
/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist file from Mac OSX El Capitan
com.apple.mdnsresponder.plist<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.apple.mDNSResponder.reloaded</string> <key>OnDemand</key> <false/> <key>InitGroups</key> <false/> <key>UserName</key> <string>_mdnsresponder</string> <key>GroupName</key> <string>_mdnsresponder</string> <key>ProgramArguments</key> <array> <string>/usr/sbin/mDNSResponder</string> </array> <key>MachServices</key> <dict> <key>com.apple.mDNSResponder</key> <true/> <key>com.apple.mDNSResponder.dnsproxy</key> <true/> </dict> <key>Sockets</key> <dict> <key>Listeners</key> <dict> <key>SockFamily</key> <string>Unix</string> <key>SockPathName</key> <string>/var/run/mDNSResponder</string> <key>SockPathMode</key> <integer>438</integer> </dict> </dict> <key>POSIXSpawnType</key> <string>Interactive</string> <key>EnablePressuredExit</key> <false/> </dict> </plist>
get_plugin_directory_path function for WordPress to get plugin directory path based on plugin header information
get_plugin_directory_path.php<?php if( ! function_exists( ‘get_plugin_directory_path’) ){ /** * Get Plugin’s Directory Path * * Search for a plugin’s directory path, based on configuration in the plugin’s main plugin * file. By default if passed search value is a string, will search the `Name` value. To * search multiple values, or different value to match, pass […]
Automatically set/assign parent taxonomy terms for hierarchical taxonomies in WordPress (specifically WP Job Manager Job Listing Category)
functions.php<?php add_action( ‘set_object_terms’, ‘auto_set_parent_terms’, 9999, 6 ); /** * Automatically set/assign parent taxonomy terms to posts * * This function will automatically set parent taxonomy terms whenever terms are set on a post, * with the option to configure specific post types, and/or taxonomies. * * * @param int $object_id Object ID. * @param array […]
Field Editor allow field HTML to show in Admin section (for Labels, description, etc)
functions.php<?php add_filter( ‘esc_html’, ‘job_manager_field_editor_allow_admin_html’ ); function job_manager_field_editor_allow_admin_html( $html ){ // We use a backtrace to check who called the esc_html $bt = debug_backtrace(); // Make sure backtrace is an array, and our required keys are set if( ! is_array( $bt ) || ! isset( $bt[4], $bt[4][‘class’], $bt[6], $bt[6][‘function’] ) ){ return $html; } // Check […]
Remove “or checkout with PayPal” (shown as button) on CART page for WooCommerce PayPal Express Checkout Payment Gateway
functions.php<?php /** * Remove Class Filter Without Access to Class Object * * In order to use the core WordPress remove_filter() on a filter added with the callback * to a class, you either have to have access to that class object, or it has to be a call * to a static method. This […]
Output dropdown in Job Filters/Search page for job_location (when configured as dropdown type) for WP Job Manager Field Editor
job-filters.php<?php $job_locations = get_custom_field_config( ‘job_location’, ‘options’ ); if ( is_array( $job_locations ) ): ?> <select class="" name="search_location" id="search_location"> <option value="" <?php selected( empty( $location ) || ! in_array( $location, $job_locations ) ); ?>><?php _e( ‘Any Location’ ); ?></option> <?php foreach( $job_locations as $loc_val => $loc_label ): ?> <option value="<?php echo esc_attr( $loc_val ); ?>" <?php […]
WP Job Manager Field Editor output Facebook and Instagram fields with @USERNAME label
functions.php<?php /** * When setting up the custom field, set it as a Text Box field type, click on the * "Advanced" tab on the left, and enter the pattern below in the "Pattern" input box. * * This assumes that your meta key for Facebook is "company_facebook" and for instagram, is * "company_instagram" … […]
Allow WP Job Manager Field Editor to convert job_expires date field output (untested)
functions.php<?php add_filter( ‘field_editor_dp_skip_conversion’, ‘allow_fe_to_convert_job_expires’ ); function allow_fe_to_convert_job_expires( $skip_fields ){ $key = array_search( ‘job_expires’, $skip_fields ); if( $key !== false ){ unset( $skip_fields[$key] ); } return $skip_fields; }
Automatically set/assign parent taxonomy terms for hierarchical taxonomies in WordPress
functions.php<?php add_action( ‘set_object_terms’, ‘auto_set_parent_terms’, 9999, 6 ); /** * Automatically set/assign parent taxonomy terms to posts * * This function will automatically set parent taxonomy terms whenever terms are set on a post, * with the option to configure specific post types, and/or taxonomies. * * * @param int $object_id Object ID. * @param array […]