Instantly share code, notes, and snippets.

View DialogLoader.vue
<template>
<div>
<!-- Using hide-overlay below allows for clicking while progress showing-->
<v-dialog
v-model="dialog"
persistent
:width="options.width"
v-bind:style="{ zIndex: options.zIndex }"
>
<v-card
View functions.php
<?php
// MAKE SURE YOU READ THE COMMENT AT BOTTOM OF THIS PAGE REGARDING UPDATING THE TEMPLATE FILE
// TO OUTPUT THE NEW DATE_END FIELD!!!
// Admin Area
add_filter( 'resume_manager_resume_experience_fields', 'smyles_custom_repeatable_fields_admin_experience' );
add_filter( 'resume_manager_resume_education_fields', 'smyles_custom_repeatable_fields_admin_education' );
// Frontend
View functions.php
<?php
// Make sure to change YOUR_META_KEY to match the meta key you want to prepend/append to
add_filter( 'field_editor_output_as_args_YOUR_META_KEY', 'smyles_add_custom_prepend_append' );
function smyles_add_custom_prepend_append( $args ){
// Shown before value:
$args['prepend'] = 'Before Value: ';
// Shown after value:
$args['append'] = 'After Value';
View functions.php
<?php
add_action( 'job_manager_update_job_data', 'smyles_save_company_data_to_job_listing', 20, 2 );
/**
* Save Company Listings (WPDrift Plugin) meta fields to job listing meta
*
*
* @since 11.20.2018
*
View functions.php
<?php
add_filter( 'field_editor_auto_populate_pre_set_value', 'smyles_auto_pop_multi_vals_single_user_meta', 10, 4 );
/**
* Modify auto populate value
*
* This example assumes you have configured multiple fields to auto populate with the same user meta key,
* and that user meta key has stored multiple values in an array format, which you want to convert to use
* in separate fields.
*
View functions.php
<?php
add_filter( 'field_editor_text_field_attributes', 'smyles_add_text_field_attr', 10, 4 );
function smyles_add_text_field_attr( $attr, $key, $field, $value ){
if( $key === 'some_meta_key' ){
// Add readonly attribute (replacing any others added through this filter)
$attr = 'readonly="readonly"';
}
View text-field.php
<?php
$key_class = "text-" . esc_attr( $key );
$classes = array( 'jmfe-text-field', 'jmfe-input-text', 'input-text' );
$classes[] = $key_class;
$maybe_required = ! empty( $field['required'] ) && get_option( 'jmfe_fields_html5_required', TRUE ) ? 'required' : '';
$value = job_manager_field_editor_get_template_value( $args );
$placeholder = array_key_exists( 'placeholder', $field ) ? esc_attr( $field['placeholder'] ) : '';
$text_field_attributes = apply_filters( 'field_editor_text_field_attributes', '', $key, $field, $value );
?>
<input type="text" class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>" name="<?php echo esc_attr( isset( $field['name'] ) ? $field['name'] : $key ); ?>" id="<?php echo esc_attr( $key ); ?>" title="<?php echo isset($field['title']) ? esc_attr( $field['title'] ) : ''; ?>" <?php echo ! empty($field['pattern']) ? "pattern=\"" . esc_attr($field['pattern']) . "\"" : ''; ?> placeholder="<?php echo $placeholder; ?>" value="<?php echo esc_attr( $value ); ?>" <?php echo ! empty( $field
View functions.php
<?php
add_shortcode( 'wcpl_my_packages', 'smyles_output_wcpl_my_packages' );
function smyles_output_wcpl_my_packages() {
// Make sure WCPL plugin is installed and activated
if( ! function_exists( 'wc_paid_listings_get_user_packages' ) || ! defined( 'JOB_MANAGER_WCPL_TEMPLATE_PATH' ) ){
return '';
}
View functions.php
<?php
if( ! function_exists( 'smyles_get_taxonomy_hierarchy' ) ){
/**
* Recursively get taxonomy and its children
*
* @param string $taxonomy
* @param int $parent Parent term ID (0 for top level)
View functions.php
<?php
/**
* Add iFrame to allowed wp_kses_post tags
*
* @param string $tags Allowed tags, attributes, and/or entities.
* @param string $context Context to judge allowed tags by. Allowed values are 'post',
*
* @return mixed
*/
function smyles_custom_wpkses_post_tags( $tags, $context ) {