View functions.php
1 2 3 4 5 6 7 8 9 10
<?php
add_filter( 'job_manager_field_editor_phone_args', 'my_custom_phone_args' );
function my_custom_phone_args( $args ){
// Other available arguments, see GitHub for details
// https://github.com/Bluefieldscom/intl-tel-input#options
//
// $args['allowExtensions'] = 'false';
// $args['autoFormat'] = 'true';
View content-single-job_listing.php
1 2 3 4 5 6 7 8 9
$images = get_custom_field( 'job_multifile' );
if ( is_array( $images ) && ! empty( $images ) ){
foreach( $images as $image ){
$thumbnail_id = get_attachment_id_from_url( $image );
$thumbnail = wp_get_attachment_thumb_url( $thumbnail_id );
echo "<a href=\"{$image}\"><img src=\"{$thumbnail}\"></a>";
}
View functions.php
1 2 3 4 5 6 7 8 9 10
if( ! function_exists( 'get_attachment_id_from_url' ) ){
function get_attachment_id_from_url( $attachment_url = '' ) {
global $wpdb;
$attachment_id = FALSE;
// If there is no url, return.
if ( '' == $attachment_url ) return;
View gist:66f2eb890d5fc07ff324
1 2 3 4 5 6 7 8 9 10
<?php
add_filter('submit_job_form_validate_fields', 'check_price_job_field');
function check_price_job_field( $has_error, $fields, $values ){
// Return true if this field doesn't exist (to prevent errors if you dont have field created)
if( ! isset( $values['job']['price'] ) ) return true;
if( empty( $values['job']['price'] ) || ! is_float( $values['job']['price'] ) ){
View job-submit.php
1 2 3 4 5 6 7 8 9
<?php
/**
* Job Submission Form
*/
if ( ! defined( 'ABSPATH' ) ) exit;
global $job_manager;
?>
<form action="<?php echo $action; ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data">
View gist:78ac7fc8f313e681bf74
1 2 3 4 5 6 7 8 9
<?php
$jmfe = WP_Job_Manager_Field_Editor_Fields::get_instance();
$job_fields = $jmfe->get_fields( 'job', 'custom' );
$company_fields = $jmfe->get_fields( 'company', 'custom' );
?>
View gist:2744c7b61231d670baf6
1 2 3 4 5 6 7
<?php
$some_field = get_job_field( 'some_meta_key' );
if( ! empty( $some_field ) ) {
echo "<h3>Some Field:</h3>";
echo $some_field;
}
?>
View gist:ccd02279117faaf365f9
1 2 3 4 5 6 7 8 9 10
if( ! function_exists( 'wp_date_format_php_to_js') ){
/**
* Convert a date format to a jQuery UI DatePicker format
*
* @param string $dateFormat a date format
*
* @return string
*/
function wp_date_format_php_to_js( $dateFormat ) {
View gist:1019f3ade7e1e6e0e97f
1 2 3 4 5 6 7 8 9 10
<?php
$sample_gallery_images = get_custom_field( 'sample_gallery_images' );
// If field value is empty don't output anything
if( ! empty( $sample_gallery_images ) && function_exists( 'job_manager_get_resized_image' ) ){
// If it's an array that means there are multiple images
if( is_array( $sample_gallery_images ) ){
foreach( $sample_gallery_images as $gallery_image ){
View phone.min.js
1
jQuery(function(a){a(".jmfe-phone").intlTelInput({ defaultCountry: "za" })});
Something went wrong with that request. Please try again.