View functions.php
<?php
/**
* This is for backwards compatibility with Field Editor 1.4.6 or older, any version 1.4.7 and newer
* will already have this function built-in, probably with some type of caching as well.
*
* If you decide to add this to your site, make sure to remove it later on if you upgrade to 1.4.7 or
* newer.
*/
if( ! function_exists( 'get_custom_field_config' ) ){
View functions.php
<?php
/**
* Recursively get taxonomy hierarchy
*
* @source http://www.daggerhart.com/wordpress-get-taxonomy-hierarchy-including-children/
* @param string $taxonomy
* @param int $parent - parent term id
*
* @return array
View 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 method allows you to remove filters with a class callback
* without having access to the object.
*
*
View functions.php
<?php
add_action( 'submit_job_form_start', 'my_custom_jquery_set_field_readonly' );
function my_custom_jquery_set_field_readonly(){
/**
* Replace FIELD_META_KEY with the meta key of the field you want to set as readonly.
* If you want to set it as disabled instead, just change 'readonly' to 'disabled'
*/
echo "<script>jQuery(function($){ $('#FIELD_META_KEY').prop('readonly', true); });</script>";
View functions.php
<?php
add_filter( 'get_post_metadata', 'my_custom_url_prepend_value', 99999, 4 );
/**
* Get Meta Filter
*
* Filter the get_metadata function to return specific value we
* customize.
*
View functions.php
<?php
if( ! function_exists( 'array_insert' ) ) {
/**
* Insert an array into another array before/after a certain key
*
* @param array $array The initial array
* @param array $pairs The array to insert
* @param string $key The certain key
* @param string $position Wether to insert the array before or after the key
View functions.php
<?php
//ONLY ADD COLUMN AND CONTENT TO CUSTOM JOB LISTINGS POSTS
add_filter('manage_job_listing_posts_columns', 'xyz123_my_custom_job_listing_columns');
add_action('manage_job_listing_posts_custom_column', 'xyz123_my_custom_job_listing_column_value', 10, 2);
// ADD COLUMN TO LIST TABLE
function xyz123_my_custom_job_listing_columns($defaults) {
$defaults['job_metakey'] = 'LabelHere';
return $defaults;
View functions.php
<?php
/**
* Filter for fields before filtering based on $filter value
*
* Filter syntax is `job_manager_field_editor_get_fields_pre_filter_{$field_group}` ... replace {$field_group} with field group
*
* Job Fields: job_manager_field_editor_get_fields_pre_filter_job
* Company Fields: job_manager_field_editor_get_fields_pre_filter_company
* Resume Fields: job_manager_field_editor_get_fields_pre_filter_resume_fields
*
View functions.php
add_filter( 'job_manager_upload_dir', 'my_custom_job_manager_upload_dir' );
function my_custom_job_manager_upload_dir( $job_manager_uploading_file ) {
// This is the default below
// $dir = 'job-manager-uploads/' . $job_manager_uploading_file;
// This is using a custom directory, make sure to add $job_manager_uploading_file to the end of the string
$dir = 'custom_jm_uploads/' . $job_manager_uploading_file;
View functions.php
<?php
add_action( 'job_manager_field_editor_save_custom_field_end', 'update_my_custom_tax_field_editor_fields', 10, 5 );
/**
* Update Listing job_category from job_category_dentist taxonomies
*
* REQUIRES: WP Job Manager Field Editor 1.4.2+
*
* This can be useful if you want to set the Job Category but for some reason have that field hidden,
* disabled, or set to not show for a specific package, but still want the category set (or maybe you want