[Hunters Hill Trust] House Count Dynamic Data Shortcode

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

[DEBUG] Action Scheduler Source Diagnostic

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

3 Dots for popup text in WordPress

/** * 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

GForms – Add {created_by:roles} merge tag to return comma separated list of roles

/* 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

GForms – Add noclasshidden modifier to {all_fields} merge tag

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