function rd_greenbook_house_count_shortcode() { $counts = wp_count_posts( ‘wpsl_stores’ ); return isset( $counts->publish ) ? esc_html( number_format_i18n( (int) $counts->publish ) ) : ‘0’; } add_shortcode( ‘rd_greenbook_house_count’, ‘rd_greenbook_house_count_shortcode’ );Continue reading
add_action( ‘admin_notices’, ‘rd_report_action_scheduler_source’ ); function rd_report_action_scheduler_source() { if ( ! current_user_can( ‘manage_options’ ) ) { return; } $versions_class = ‘ActionScheduler_Versions’; $system_info_class = ‘ActionScheduler_SystemInformation’; $action_scheduler_class = ‘ActionScheduler’; echo ‘ ‘; if ( ! class_exists( $versions_class ) && ! class_exists( $action_scheduler_class )…Continue reading
/** * Footnote popup — combined CSS + JS + content filter * Uses [[fn]]…[[/fn]] syntax — avoids: * – WordPress shortcode auto-block conversion in Gutenberg ([fn]…[/fn] would trigger it) * – espanso’s {{ }} variable syntax clash ({{fn}}…{{/fn}} would…Continue reading
add_filter( ‘gform_merge_tag_filter’, ‘signature_to_img’, 10, 6); function signature_to_img( $value, $merge_tag, $modifier, $field, $raw_value, $format ) { if ( $field->type == ‘signature’ && $modifier == ‘img’ ) { return ‘‘; } return $value; }Continue reading
add_filter( ‘gravityflow_notification’, ‘sh_gravityflow_notification’, 10, 4 ); function sh_gravityflow_notification( $notification, $form, $entry, $step ) { //ONLY ATTACH ON SPECIFIC FORMS, NOT ALL if ( $form[‘id’] != 34 ) { //34 = Client Email Notice return $notification; } $log = ‘sh_notification_attachments() –…Continue reading
/* Source: https://docs.gravityforms.com/gform_merge_tag_data/ */ add_filter( ‘gform_merge_tag_data’, function ( $data, $text, $form, $entry ) { $data[‘created_by’] = array(); if ( ! empty( $entry[‘created_by’] ) ) { $user = new WP_User( $entry[‘created_by’] ); $data[‘created_by’] = get_object_vars( $user->data ); $data[‘created_by’][‘first_name’] = $user->get( ‘first_name’…Continue reading
//Works for any Step’s Workflow Notifications // Custom Merge Tags to retrieve info about the user with the corresponding ‘to’ // email in the GFlow Notification // A GFlow notification’s ‘to’ contains the list of emails the notification will be…Continue reading
add_filter( ‘gform_merge_tag_filter’, ‘filter_all_fields_hide’, 10, 4 ); function filter_all_fields_hide ( $value, $merge_tag, $modifier, $field ) { if ( $merge_tag == ‘all_fields’ && str_contains( $modifier, ‘noclasshidden’ ) && str_contains( $field->cssClass, ‘all-fields-hide’ ) ) { return false; } return $value; }Continue reading