This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'search_and_filtering_geolocation_geocode_address_google_url', 'smyles_custom_geocode_url', 10, 2 ); | |
// DE below is the 2 digit country code to limit results to | |
function smyles_custom_geocode_url( $url, $address ){ | |
return $url . '&components=country:DE'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'smyles_check_sloppy_dev_scripts', 99999 ); | |
function smyles_check_sloppy_dev_scripts(){ | |
global $post; | |
if( ! $post ){ | |
return; | |
} | |
$has_a_shortcode = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'job_manager_application_field_skip_email_url_validation', '__return_true' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'job_manager_field_editor_date_args', 'my_custom_date_args' ); | |
function my_custom_date_args( $args ){ | |
$args['changeMonth'] = true; | |
$args['changeYear'] = true; | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Replace URLs and Emails with HTML links | |
* | |
* This function will replace all URLs and Email Addresses wrapped in HTML links, ONLY if one does not already exist, | |
* excluding punctuation (email or url followed by period, comma, etc). | |
* | |
* @author Myles McNamara | |
* @param $content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
if ( ! class_exists( 'WP_Job_Manager_Form' ) ) { | |
include( JOB_MANAGER_PLUGIN_DIR . '/includes/abstracts/abstract-wp-job-manager-form.php' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove the line below if you want to keep this handling on the frontend | |
add_filter( 'field_editor_save_custom_fields_remove_empty_value_fields', '__return_false' ); | |
// Remove the line below if you want to keep this handling in the admin area | |
add_filter( 'field_editor_save_admin_custom_fields_remove_empty_value_fields', '__return_false' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'hidden_columns', 'smyles_check_hidden_columns_is_array', 9999999999999 ); | |
function smyles_check_hidden_columns_is_array( $hidden ){ | |
return is_array( $hidden ) ? $hidden : array(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'search_and_filtering_geolocation_geocode_address_google_url', 'smyles_custom_geocode_url', 10, 2 ); | |
function smyles_custom_geocode_url( $url, $address ){ | |
return $url . '&components=country:BE|postal_code:' . $address; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'job_manager_visibility_admin_job_permalink_max_slug_chars', 'smyles_max_job_permalink_chars' ); | |
add_filter( 'job_manager_visibility_job_permalink_max_slug_chars', 'smyles_max_job_permalink_chars' ); | |
function smyles_max_job_permalink_chars( $chars ){ | |
return 50; | |
} |