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 | |
/** | |
* Generates the content used in the notification email. | |
* | |
* This template can be overridden by copying it to yourtheme/wp-job-manager-alerts/content-email_job_listing.php. | |
* | |
* @see https://wpjobmanager.com/document/template-overrides/ | |
* @author Automattic | |
* @package WP Job Manager - Alerts | |
* @category Template |
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( 'submit_job_form_fields', 'smyles_remove_fields_by_user_role', 999999999999 ); | |
function smyles_remove_fields_by_user_role( $fields ){ | |
$fields_to_remove = array( 'job_salary', 'some_other_meta_key' ); | |
$user = wp_get_current_user(); | |
if ( in_array( 'employer', (array) $user->roles ) ) { |
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_get_placeholder_do_process', 'smyles_check_can_view_resume_from_listing', 10, 3 ); | |
add_filter( 'job_manager_visibility_get_meta_do_process', 'smyles_check_can_view_resume_from_listing', 10, 3 ); | |
function smyles_check_can_view_resume_from_listing( $do, $object_id, $meta_key ) { | |
/** | |
* Meta keys defined here do not rely on the "anonymous_resume" settings to process | |
* through the visibility handling. These MUST include a prepended underscore. |
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( 'submit_job_form_fields', 'smyles_allow_zero_value_field' ); | |
function smyles_allow_zero_value_field( $fields ){ | |
$fields['job']['METAKEY']['before_sanitize'] = true; | |
return $fields; | |
} | |
add_filter( 'job_manager_get_posted_number_field', 'smyles_allow_zero_value_number_field_handler' ); |
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_afjcl_company_jobs_tab_shortcode', 'sf_company_jobs_tab_shortcode' ); | |
function sf_company_jobs_tab_shortcode( $sc ){ | |
return '[jobs filter_section_id="2451"]'; | |
} |
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( 'company_listings_tabs', 'smyles_company_listings_tabs_disable_sf' ); | |
function smyles_company_listings_tabs_disable_sf( $tabs ){ | |
if( isset( $tabs['jobs'] ) ){ | |
$tabs['jobs']['callback'] = 'company_listings_company_jobs_tab_no_sf'; | |
} | |
return $tabs; |
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_get_taxonomy_data_options_args', 'smyles_sf_tax_hide_empty' ); | |
function smyles_sf_tax_hide_empty( $args ){ | |
$args['hide_empty'] = 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 | |
add_filter( 'job_manager_get_listings_args', 'smyles_double_space_replace', 999999 ); | |
add_filter( 'resume_manager_get_resumes_args', 'smyles_double_space_replace', 999999 ); | |
/** | |
* Replace Double Byte Space with Regular Space in Search Keywords | |
* | |
* @param $args | |
* | |
* @return mixed |
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( 'single_resume_meta_start', 'smyles_output_resume_listing_id' ); | |
function smyles_output_resume_listing_id(){ | |
echo 'Listing ID: ' . get_the_ID(); | |
} |
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 | |
$classes = array( 'input-text', 'cariera-file-upload' ); | |
$allowed_mime_types = array_keys( ! empty( $field['allowed_mime_types'] ) ? $field['allowed_mime_types'] : get_allowed_mime_types() ); | |
$field_name = isset( $field['name'] ) ? $field['name'] : $key; | |
$field_name .= ! empty( $field['multiple'] ) ? '[]' : ''; | |
$classes[] = "file-" . esc_attr( $key ); | |
$use_ajax = ! empty( $field['ajax'] ) && field_editor_user_can_upload_file_via_ajax(); | |
if ( $use_ajax ) { | |
wp_enqueue_script( 'wp-job-manager-ajax-file-upload' ); |