content-single-job_listing.php<div class="single_job_listing" itemscope itemtype="http://schema.org/JobPosting"> <meta itemprop="title" content="<?php echo esc_attr( $post->post_title ); ?>" /> <?php if ( $post->post_status == ‘expired’ ) : ?> <div class="job-manager-info"><?php _e( ‘This listing has expired’, ‘wp-job-manager’ ); ?></div> <?php else : ?> <?php /** * single_job_listing_start hook * * @hooked job_listing_meta_display – 20 * @hooked job_listing_company_display – 30 */ do_action( ‘single_job_listing_start’ […]
gistfile1.php// Change job_listing_meta_end to job_listing_meta_start to output at start add_action( ‘job_listing_meta_end’, ‘add_salary_to_job_listing’ ); function add_salary_to_job_listing(){ // Assuming the meta key is job_salary $field_value = get_job_field( ‘job_salary’ ); echo "<li>Salary: " . $field_value . "</li>"; }
custom taxonomy php output options
gistfile1.php// Get the custom field taxonomy selected term ID’s $field_value = get_custom_field("outsourcing_partial_type"); if ( is_array( $field_value ) ) { foreach ( $field_value as $selected_value ) { $tax = get_term_by( ‘id’, (int) $selected_value, "outsourcing_partial_type" ); // Set the name of the taxonomy an an item in a new array $tax_labels[] = $tax->name; // Or you could […]
add this code to your theme’s functions.php file
gistfile1.php// Add your own function to filter the fields add_filter( ‘submit_resume_form_fields’, ‘custom_submit_resume_form_fields’ ); // This is your function which takes the fields, modifies them, and returns them // You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php function custom_submit_resume_form_fields( $fields ) { // Here we target one of the job fields (job_title) and […]
date picker select from any dates
date.min.jsjQuery(function(a){a(".jmfe-date-picker").each(function(){a(this).datepicker({dateFormat:jmfe_date_field.date_format,monthNames:jmfe_date_field.monthNames,monthNamesShort:jmfe_date_field.monthNamesShort,dayNames:jmfe_date_field.dayNames,dayNamesShort:jmfe_date_field.dayNamesShort,dayNamesMin:jmfe_date_field.dayNamesMin})})});
PHP customized array_column function for recursion, named array_column_recursive
array_column_recursive.phpif ( ! function_exists( ‘array_column_recursive’ ) ) { /** * Returns the values recursively from columns of the input array, identified by * the $columnKey. * * Optionally, you may provide an $indexKey to index the values in the returned * array by the values from the $indexKey column in the input array. * * […]
Powershell RegEx to Hash Table Key->Value pairs
conftohashtable.ps1 $configData = "system_date=’2014/11/13′ system_time=’14:40:15′ system_ntp=’192.168.150.48′ system_daylight_enable=’1′ system_updateinterval=’3600′ " $regex = [regex]("(w+)(?=='(.*)’)") $camConfs = @{} $regex.matches( $configData ) | ForEach-Object { $camConfs["$_"] = $_.groups[2].value } echo $camConfs
ps mail
gistfile1.txt$fromEmail = "Server <[email protected]>" $smtpServer = "10.10.10.10" $subject = "Random Subject" $body = "Random Body" $emailTo = "Myles <[email protected]>", "Bill <[email protected]>", "John <[email protected]>" send-mailmessage -to $emailTo -from "$fromEmail" -subject "$subject" -body "$body" -smtpServer "$smtpServer" -BodyAsHtml
Default WPRM Submit Function
class-wp-resume-manager-form-submit-resume.php/** * Submit Step */ public static function submit() { global $job_manager, $post; self::init_fields(); // Load data if neccessary if ( ! empty( $_POST[‘edit_resume’] ) && self::$resume_id ) { $resume = get_post( self::$resume_id ); foreach ( self::$fields as $group_key => $fields ) { foreach ( $fields as $key => $field ) { switch ( $key […]
gistfile1.phtml$interests = get_resume_field( ‘careers_interest’ ); if ( ! empty( $interests ) ) { if ( is_array( $interests ) ) { foreach ( $interests as $selected_value ) { $tax = get_term_by( ‘id’, (int) $selected_value, ‘careers_interest’ ); echo "<li>" . $tax->name . "</li>"; } } else { $single_term = get_term_by( ‘id’, (int) $interests, ‘careers_interest’ ); echo "<li>" […]