add_filter( ‘frm_filtered_lookup_options’, ‘change_lookup_options’, 10, 2 ); function change_lookup_options( $options, $args ) { if ( $args[‘field’]->id == 1137) { // change 808 to the id of the user ID field from the other form foreach ( $options as $k => $option…Continue reading
add_filter( ‘aioseo_disable_title_rewrites’, ‘aioseo_disable_term_title_rewrites’ ); function aioseo_disable_term_title_rewrites( $disabled ) { if ( is_category() || is_tag() || is_tax() ) { return true; } return false; }Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
add_action(‘acf/init’, function() { if (!function_exists(‘acf_add_local_field_group’)) { return; } acf_add_local_field_group(array( ‘key’ => ‘group_services_catalog’, ‘title’ => ‘Services Catalog’, ‘fields’ => array( array( ‘key’ => ‘field_service_catalog’, ‘label’ => ‘Service Catalog’, ‘name’ => ‘service_catalog’, ‘type’ => ‘group’, ‘sub_fields’ => array( array( ‘key’ => ‘field_catalog_name’,…Continue reading
add_action( ‘acf/include_fields’, function() { if ( ! function_exists( ‘acf_add_local_field_group’ ) ) { return; } acf_add_local_field_group( array( ‘key’ => ‘group_67d0398f17a09’, ‘title’ => ‘CTA Interstitial’, ‘fields’ => array( array( ‘key’ => ‘field_67d0398f54df6’, ‘label’ => ‘Title’, ‘name’ => ‘cta_int_title’, ‘aria-label’ => ”, ‘type’…Continue reading
// Add a page interstitial for a CTA section function cta_interstitial_shortcode() { $output = ”; $postid = get_the_ID(); $title = get_field(‘cta_int_title’, $postid); $copy = get_field(‘cta_int_copy’, $postid); $buttons = get_field(‘cta_int_buttons’, $postid); if (!empty($title && $copy) || have_rows(‘cta_int_buttons’)) { $output .= ‘…Continue reading
add_filter(‘mepr-member-signup-reminder-disable’, function($disable_email, $reminder, $usr, $prd) { // Array of email addresses for which the signup reminder email should be disabled $emails = array(‘[email protected]’, ‘[email protected]’); // Check if the user’s email is in the list if (in_array($usr->user_email, $emails)) { $disable_email =…Continue reading
add_filter(‘mepr-wp-mail-recipients’, function($recipients, $subject, $message, $headers) { if (strpos($subject, ‘Subscription renewal’) !== false) { foreach ($recipients as $key => $recipient) { // Extract the email address from the recipient field $regExp = “/]+)>/”; preg_match($regExp, $recipient, $matches); $recipient = $matches[1]; $wp_user =…Continue reading