View functions.php
<?php
add_filter( 'login_url', 'smyles_custom_login_url', 10, 3 );
/**
* Filters the login URL.
*
* @since 2.8.0
* @since 4.2.0 The `$force_reauth` parameter was added.
*
* @param string $login_url The login URL. Not HTML-encoded.
View functions.php
<?php
add_filter( 'submit_job_form_fields', 'smyles_custom_max_images_per_package', 101 );
function smyles_custom_max_images_per_package( $fields ) {
$max_packages = array(
// The key should be the ID of the product (look at the ID when editing the product in the URL bar)
'11111' => array(
// Array key should be the exact meta key
View functions.php
<?php
add_shortcode( 'nearby_listings_btn', 'smyles_nearby_listings_btn' );
function smyles_nearby_listings_btn( $atts = array(), $content = '' ){
// Default output is blank
$output = '';
$caption = __( 'Search Nearby Businesses' );
View functions.php
<?php
add_filter( 'submit_job_form_fields', 'smyles_custom_max_selected_fields_per_package', 101 );
function smyles_custom_max_selected_fields_per_package( $fields ){
$max_packages = array(
// The key should be the ID of the product
'11130' => array(
'job_category' => 3,
View functions.php
<?php
add_filter( 'job_manager_get_posted_textarea_field', 'smyles_return_textarea_handler' );
function smyles_return_textarea_handler( $handler ){
return 'smyles_get_textarea_handler';
}
function smyles_get_textarea_handler( $key, $field ){
View functions.php
<?php
$candidate_name = get_custom_field( 'candidate_name' );
if ( ! empty( $candidate_name ) ) {
$some_url = 'http://somedomain.com/';
$search_url = add_query_arg(
array(
View functions.php
<?php
// The filter is field_editor_output_as_value_METAKEY
// where you need to replace METAKEY with the actual meta key you want to filter the output for
add_filter( 'field_editor_output_as_value_META_KEY_ONE', 'smyles_encode_email_on_output' );
function smyles_encode_email_on_output( $value ){
if( empty( $value ) ) return $value;
if( function_exists( 'eae_encode_str' ) ){
View functions.php
<?php
// First let's get the permalink to the listings page
$jobs_list_page = job_manager_get_permalink( 'jobs' );
// Next we need to pull the value the user entered in the job_location field
$job_location = get_custom_field( 'job_location' );
// Then we get from post meta the value of `geolocated` which will be 1 when core WP Job Manager has geolocation data for this listing
$is_geolocated = get_post_meta( get_the_ID(), 'geolocated', true );
// Verify we have a valid job lists page, a value for job location, and the listing has been geolocated
// We check geolocated to make sure that the job_location value *should* be a valid address
View functions.php
<?php
add_filter( 'submit_job_post_status', 'smyles_set_job_post_status_by_user_role', 10, 2 );
/**
* Automatically set Job post status based on current user's role
*
* @param $status
* @param $job
*
View functions.php
<?php
add_action( 'job_manager_update_job_data', 'smyles_update_job_listing_user_count', 10, 2 );
/**
* Update user meta with total job posts submitted (does not take into account removed or expired listings)
*
*
* @param $job_id
* @param $values
*/