View functions.php
<?php
add_filter( 'job_manager_field_editor_js_conf_meta_keys', 'smyles_allow_featured_image_admin_only' );
/**
* Allow featured_image to be set as admin only
*/
function smyles_allow_featured_image_admin_only( $config ){
// Make sure admin_only_0 is in disabled fields first (_0 added for any checkboxes)
View script.js
jQuery( function($){
// To use for field other than job_region, change job_region to the meta
// key of the field
$( '#job_region > .level-0' ).each( function ( index ) {
$( this ).prop( 'disabled', 'disabled' );
});
$( '#job_region' ).trigger( 'chosen:updated' );
View functions.php
<?php
// This must be ran on priority 15 as Listify updates gallery images and featured image @ priority 12
add_action( 'job_manager_update_job_data', 'smyles_listify_featured_image_from_gallery', 15, 2 );
function smyles_listify_featured_image_from_gallery( $job_id, $values ){
if ( ! isset( $values[ 'job' ][ 'gallery_images' ] ) ) {
return;
}
View functions.php
<?php
add_filter( 'job_manager_term_select_field_wp_dropdown_categories_args', 'smyles_set_tax_dropdown_placeholder' );
function smyles_set_tax_dropdown_placeholder( $args ){
$taxonomy = $args['taxonomy'];
switch ($taxonomy){
// Set your custom taxonomy here
View functions.php
<?php
add_action( 'job_manager_update_job_data', 'smyles_add_auto_increment_field', 10, 2);
function smyles_add_auto_increment_field( $job_id, $values ){
$meta_key = '_my_increment_field';
$inc_option = 'smyles_job_auto_increment';
$already_set = get_post_meta( $job_id, $meta_key, true);
View 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 SOURCE PLUGIN LATER ON, BUT AS OF NOW I DON'T HAVE TIME TO
*/
View 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/>
View 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 as an array with key => value.
*
View 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.
*
View 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'] ) ){