Skip to content

Instantly share code, notes, and snippets.

View matadorjobs's full-sized avatar

Matador Jobs matadorjobs

View GitHub Profile
@matadorjobs
matadorjobs / example_matador_import_job_general_location.php
Last active March 30, 2020 19:23
Matador Docs Example: Modify Job General Location Meta Field
<?php //omit opening PHP tag
add_filter( 'matador_import_job_general_location', 'mdocs_example_matador_import_job_general_location', 10, 2 );
/**
* Example Job General Location Filter Function
*
* @copyright 2020, Matador Software, LLC
* @author Jeremy Scott, Matador Software LLC
* @link https://matadorjobs.com/
*
* @param string $general_location
@matadorjobs
matadorjobs / tutorial_matador_upgrade_3-5-6.php
Last active March 31, 2020 02:21
Matador 3.5.6 (and later) Upgrade for matador_the_job_description()
/**
* Matador Jobs 3.5.6 Breaking Change Upgrade Method 1 (Preferred)
*
* If your site's appearance is affected by the 3.5.6 upgrade containing the backward-incompatible
* change to matador_the_job_description() or matador_get_the_job_description(), here is the preferred
* method to fix it.
*
* @copyright 2020, Matador Software, LLC
* @author Jeremy Scott, Matador Software LLC
* @link https://matadorjobs.com/support/documentation/upgrading-to-3-5-6/
@matadorjobs
matadorjobs / matador_docs_matador_application_confirmation_candidate_subject.php
Created October 11, 2019 18:08
Modify the Subject of an Email Confirmation to Candidates
<?php
/**
* Modify the Subject of the Email Confirmation to Candidates
*
* @since 2019-10-11
*
* @param string $subject Email subject
* @param array $application_data The array of data from the application form submission
* @param string $job_title The formatted name of the job they applied to, if any.
*
@matadorjobs
matadorjobs / matador_docs_add_custom_field_application.php
Last active October 11, 2019 16:40
Add a Custom Form Field to Your Form
<?php
/**
* Example: Add a Custom Field to Your Default Form
*
* Adding a custom field to your form in Matador requires 2 steps, as well as an optional 3rd.
*
* 1. Registering the Field
* 2. Adding it to a form, either via the shortcode, function, or adding it to defaults
* 3. Choosing to make it required.
*
@matadorjobs
matadorjobs / example_matador_docs_matador_bullhorn_import_fields.php
Last active May 11, 2022 05:49
Matador Docs Example: Import Additional (custom) Fields to Your Job
<?php
/**
* Example: Import Additional Job Fields from Bullhorn
*
* Example below imports Bullhorn field named 'customText4', calls it 'salary_range', declares it a 'string', and saves it as
* Job Meta for use in the front-end of the website, presumably to replace the 'salary' with a more descriptive range stat.
*
* @since 2019-07-19
* @updated 2022-05-10
*
@matadorjobs
matadorjobs / add_page_builder_shortcodes_before_and_after_job_description.php
Last active July 25, 2019 19:57
Add "Page Builder" Shortcodes before and after Matador Job Description
<?php // do not include opening PHP tag unless required
/**
* Matador Docs : Adding "Page Builder" shortcodes before/after job description
*
* @author Jeremy Scott, Paul Bearne, Matador Software LLC https://matadorjobs.com
*
* @param $content
*
* @return string
*/
@matadorjobs
matadorjobs / matador_jobs_add_logo_to_job_structured_data.php
Created March 29, 2019 17:05
Matador Jobs add a company/site logo to Job JSON+LD
<?php
/**
* Add Logo to Job Structured Data (JSON+LD)
*
* @see https://matadorjobs.com/support/documentation/add-a-logo-to-google-for-jobs-listings/
*
* @param array $ld the Job Structured Data before save.
* @return array $ld the modified Job Structured Data for saving.
*/
function mj_add_logo_to_job_jsonld( $ld ) {