Disable Attachment Pages

add_action( ‘template_redirect’, function () { global $post; if ( ! is_attachment() || ! isset( $post->post_parent ) || ! is_numeric( $post->post_parent ) ) { return; } // Does the attachment have a parent post? // If the post is trashed, fallback…Continue reading

lps-school-search-wpcode PHP

// Prevent duplicate execution if (defined(‘LPS_SCHOOL_SEARCH_LOADED’)) { return; } define(‘LPS_SCHOOL_SEARCH_LOADED’, true); // Output HTML and JavaScript ?> Nearby Schools Hide School Search Data from Florida Department of Education Pre-K Kindergarten Elementary Middle/Jr. High Senior High Combination Adult Other Pre-K Show…Continue reading

schools_rest_api 7182025

add_action(‘rest_api_init’, function() { register_rest_route(‘schools/v1’, ‘/schools’, [ ‘methods’ => WP_REST_Server::READABLE, ‘callback’ => ‘fetch_schools’, ‘permission_callback’ => ‘__return_true’, ‘args’ => [ ‘lat’ => [ ‘required’ => true, ‘validate_callback’ => function($param) { return is_numeric($param) && $param >= -90 && $param function($param) { return floatval($param);…Continue reading

HPOS Order Table – Internal Name (Nickname) Column

// 1. Add “Internal Name” column after the Order Number column in HPOS Orders Table add_filter(‘woocommerce_shop_order_list_table_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { // Insert custom column…Continue reading

HPOS Order Table – Internal Name (Nickname) Column

// 1. Add “Internal Name” column after the Order Number column in HPOS Orders Table add_filter(‘woocommerce_shop_order_list_table_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { // Insert custom column…Continue reading

Legacy Order Table – Internal Name (Nickname) Column

if ( function_exists(‘wc_get_container’) && ! wc_get_container()->get(\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled() ) { // LEGACY ORDER TABLE SNIPPET HERE add_filter(‘manage_edit-shop_order_columns’, function($columns) { $new_columns = []; foreach ($columns as $key => $label) { $new_columns[$key] = $label; if ($key === ‘order_number’) { $new_columns[‘internal_name’] = ‘Internal Name’; }…Continue reading

all important 3

add_action(‘admin_menu’, ‘custom_order_status_checker_menu’); function custom_order_status_checker_menu() { add_menu_page( ‘بررسی وضعیت گروهی سفارش‌ها’, // عنوان صفحه ‘بررسی وضعیت گروهی’, // عنوان منو در پیشخوان ‘manage_woocommerce’, // سطح دسترسی ‘check-orders-status’, // slug منو ‘custom_order_status_checker_page’, // تابع نمایش محتوا ‘dashicons-search’, // آیکون منو 56 //…Continue reading