MFP > ACF Google API Key
add_action(‘acf/init’, ‘acf_init_google_api_key’); function acf_init_google_api_key() { acf_update_setting(‘google_api_key’, ‘AIzaSyAN_UuSnJqi4C4cinccmoHtK619hGptrbc’); }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action(‘acf/init’, ‘acf_init_google_api_key’); function acf_init_google_api_key() { acf_update_setting(‘google_api_key’, ‘AIzaSyAN_UuSnJqi4C4cinccmoHtK619hGptrbc’); }Continue reading
add_action(‘acf/save_post’, ‘add_show_children’); function add_show_children($post_id) { if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return $post_id; if (!wp_is_post_revision($post_id) && ‘show’ == get_post_type($post_id) && ‘auto-draft’ != get_post_status($post_id) && ‘draft’ == get_post_status($post_id) ) { if (0 == get_post($post_id)->post_parent) { $countInt = (int) 1; $count = (string) $countInt;…Continue reading
add_action(‘acf/save_post’, ‘add_show_children’); function add_show_children($post_id) { if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return $post_id; if (!wp_is_post_revision($post_id) && ‘show’ == get_post_type($post_id) && ‘auto-draft’ != get_post_status($post_id) && ‘draft’ == get_post_status($post_id) ) { if (0 == get_post($post_id)->post_parent) { $countInt = (int) 1; $count = (string) $countInt;…Continue reading
add_action(‘acf/save_post’, ‘add_show_children’); function add_show_children($post_id) { if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return $post_id; if (!wp_is_post_revision($post_id) && ‘show’ == get_post_type($post_id) && ‘auto-draft’ != get_post_status($post_id) && ‘draft’ == get_post_status($post_id) ) { if (0 == get_post($post_id)->post_parent) { $countInt = (int) 1; $count = (string) $countInt;…Continue reading
function get_email_data_from_options($key, $type) { $values = array(); if (have_rows($key, ‘option’)) while (have_rows($key, ‘option’)) : the_row(); if (get_sub_field(‘type’) == $type) { $values[‘from_email’] = get_sub_field(‘from_email’); $values[‘from_name’] = get_sub_field(‘from_name’); $values[‘subject’] = strip_tags(apply_filters(‘the_content’, get_sub_field(‘subject’))); // $values[‘message’] = apply_filters(‘the_content’, get_sub_field(‘message’)); $values[‘message’] = get_sub_field(‘message’); add_filter(‘wp_mail_from’, function…Continue reading
add_action(‘acf/render_field_settings/type=relationship’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=url’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=number’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=select’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=taxonomy’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=text’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=email’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=textarea’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=date_time_picker’, ‘add_readonly_and_disabled_to_field’); function add_readonly_and_disabled_to_field($field) { acf_render_field_setting($field, array( ‘label’ => __(‘Read Only?’, ‘acf’), ‘instructions’ => ”, ‘type’ => ‘radio’, ‘name’ => ‘readonly’, ‘choices’ => array(…Continue reading
/** * Plugin Name: Email Template * Description: Styles the all emails with HTML * Version: 1.2.3 * Author: Thomas Senecal * License: GPL-2.0+ * Text Domain: email-template **/ add_filter( ‘wp_mail_content_type’, ‘eliteweblabs_set_email_content_type’ ); function eliteweblabs_set_email_content_type() { return “text/html”; } add_filter(…Continue reading