This file contains hidden or 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 | |
| // You need to use this file as a template override for this to work, | |
| // for more details please see the wpjobmanager.com documentation: | |
| // https://wpjobmanager.com/document/template-overrides/ | |
| // Get selected value | |
| if ( isset( $field['value'] ) ) { | |
| $selected = $field['value']; | |
| } elseif ( ! empty( $field['default'] ) && is_int( $field['default'] ) ) { | |
| $selected = $field['default']; |
This file contains hidden or 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 wp_enqueue_script( 'wp-job-manager-multiselect' ); ?> | |
| <select multiple="multiple" name="<?php echo esc_attr( isset($field['name']) ? $field['name'] : $key ); ?>[]" id="<?php echo esc_attr( $key ); ?>" class="job-manager-multiselect" <?php if( ! empty($field['required']) ) echo 'required'; ?> data-no_results_text="<?php _e( 'No results match' ); ?>" data-multiple_text="<?php _e( 'Select Some Options' ); ?>"> | |
| <?php | |
| $no_values = isset( $field['value'] ) ? false : true; | |
| foreach ( $field['options'] as $key => $value ) : | |
| $key = str_replace( '*', '', $key, $replace_default ); | |
| $key = str_replace( '~', '', $key, $replace_disabled ); | |
| $field_value = isset( $field['value'] ) ? $field['value'] : array(); | |
| if( $no_values && $replace_default > 0) $field[ 'value' ][ ] = $key; |
This file contains hidden or 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_shortcode('listing_custom_file_output', 'listing_custom_file_output_filename_link'); | |
| function listing_custom_file_output_filename_link( $atts, $content = ''){ | |
| // !! WARNING !! | |
| // When using the core WordPress `get_post_meta` you MUST prepend the meta key | |
| // with an underscore. So if the meta key was listing_custom_file, below it | |
| // needs to be _listing_custom_file | |
| $file_paths = get_post_meta( get_the_ID(), "_listing_custom_file") |
This file contains hidden or 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 | |
| // | |
| // CUSTOM FILTER TO ADD COMMA AFTER TAXONOMY OUTPUT FOR FIELD EDITOR | |
| // | |
| // | |
| add_filter( 'field_editor_output_no_wrap_after', 'mysite_check_if_need_to_output_csv', 10, 6 ); | |
| function mysite_check_if_need_to_output_csv( $separator, $field_slug, $job_id, $field_values, $args, $single_value ){ |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <templateSet group="WordPress"> | |
| <template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
| <variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="HTML_TEXT" value="false" /> | |
| <option name="HTML" value="false" /> | |
| <option name="XSL_TEXT" value="false" /> | |
| <option name="XML" value="false" /> |
This file contains hidden or 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 | |
| // https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters | |
| function xyz_custom_orderby( $query_args ) { | |
| // Use meta_value_num for numeric sorting (if issues with meta_value) | |
| $query_args[ 'orderby' ] = 'meta_value'; | |
| $query_args[ 'order' ] = 'ASC'; | |
| return $query_args; | |
| } | |
| add_filter( 'job_manager_get_listings_args', 'xyz_custom_orderby', 99 ); |
This file contains hidden or 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 | |
| $field_values = get_custom_field( 'field_meta_key' ); | |
| if( ! empty( $field_values ) ){ | |
| // The default in code below is to output a line break HTML (<br />) after each item, | |
| // if you want to use something else or different HTML, just replace <br /> below | |
This file contains hidden or 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 | |
| $sh_indoor_outdoor = get_job_field( 'indoor_outdoor' ); | |
| if( is_array( $sh_indoor_outdoor ) && ! empty( $sh_indoor_outdoor ) ){ | |
| foreach( $sh_indoor_outdoor as $value ){ | |
| // Go to next item if $value is an empty string, 0, false, or empty array | |
| if( empty( $value ) ) continue; |
This file contains hidden or 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 | |
| /** | |
| * | |
| * WARNING: this only checks if the email is being sent to the same email as admin_email option. | |
| * If for some reason another email is sent to that same email address, but it's not meant as an "admin email" | |
| * this filter will still add those additional emails, just something to keep in mind. | |
| */ | |
| add_filter( 'wp_mail', 'my_custom_to_admin_emails' ); |
This file contains hidden or 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 | |
| /** | |
| * Single view Company information box | |
| * | |
| * Hooked into single_job_listing_start priority 30 | |
| * | |
| * @since 1.14.0 | |
| */ | |