Type: php
Duplicate Post/Page Link (copy)
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
Duplicate Post/Page Link (copy)
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
Markdown URLs for LLMs (copy)
/** * After enabling this snippet, go to Settings > Permalinks and click “Save Changes” * Configure the $enabled_post_types array to specify which post types should support .md URLs */ $enabled_post_types = [ ‘post’, ‘page’ ]; // Add rewrite rule…Continue reading
File Size Checker
/** * File Size Analyzer for WordPress * Displays all files in WordPress installation sorted by size * Paste this into WPCode as a PHP snippet */ // Only allow administrators to view this if (!current_user_can(‘manage_options’)) { wp_die(‘You do not…Continue reading
ACF – KEYSMST_ Case – Tab 8: Contact Log Staging Fields
/** * WPCode Snippet: MST Case – Tab 8: Contact Log Staging Fields * Description: Temporary staging fields for weekly contact log aggregation * Priority: 13 (loads with Tab 8: Treatment Progress) * Location: mst_case post type * * CRITICAL:…Continue reading
CPT_KEYSMST_Weekly Summary Child to MST CASE
/** * Plugin Name: MST Weekly Summary CPT – Blueprint v4.2 Compliant * Description: Weekly summary CPT for MST cases – hierarchical child of mst_case, optimized for Gravity Suite integration * Version: 2.1.0 – Blueprint v4.2 Aligned (CREATES NEW POST…Continue reading
ACF_KEYSMST_MSTCASECPT – TAB – ADMINISTRATIVE (v3.0 Modular)
/** * ============================================ * MST CASE – TAB: ADMINISTRATIVE (v3.0 Modular) * ============================================ * * Purpose: Adds Administrative tab to master field group * Parent: group_mst_case_master * Source: System metadata and internal tracking * Fields: 15 fields * * VERSION:…Continue reading
ACF_KEYSMST_MSTCASECPT – TAB – OUTCOMES & DISCHARGE (v3.0 Modular)
/** * ============================================ * MST CASE – TAB: OUTCOMES & DISCHARGE (v3.0 Modular) * ============================================ * * Purpose: Adds Outcomes & Discharge tab to master field group * Parent: group_mst_case_master * Source: Compare baseline measurements to current outcomes * Fields:…Continue reading
ACF_KEYSMST_MSTCASECPT – BASELINE MEASUREMENTS (v3.0 Modular)
/** * ============================================ * MST CASE – TAB: BASELINE MEASUREMENTS (v3.0 Modular) * ============================================ * * Purpose: Adds Baseline Measurements tab to master field group * Parent: group_mst_case_master * Source: Forms 244, 245, 240, 218 – Pre-treatment baseline data *…Continue reading