// AJAX action to handle gallery rendering add_action(‘wp_ajax_render_user_gallery’, ‘handle_render_user_gallery’); add_action(‘wp_ajax_nopriv_render_user_gallery’, ‘handle_render_user_gallery’); /** * Handle AJAX request to render the user gallery. */ function handle_render_user_gallery() { $gallery_html = get_user_gallery_html(); // Return a JSON response if (!empty($gallery_html)) { wp_send_json_success([‘html’ => $gallery_html]); }…Continue reading
add_action( ‘admin_enqueue_scripts’, function () { if ( ! function_exists( ‘aioseo’ ) ) { return; } // Remove the “Select Primary Category” box from the post editor. wp_dequeue_script( ‘aioseo/js/src/vue/standalone/primary-term/main.js’ ); }, 100 ); // Prevent AIOSEO from changing the category to…Continue reading
add_action( ‘admin_footer’, ‘ajouter_bouton_jetengine_generer_formulaire’ ); function ajouter_bouton_jetengine_generer_formulaire() { // Vérifiez si nous sommes sur une page JetEngine $current_screen = get_current_screen(); if ( ! in_array( $current_screen->id, array( ‘jet-engine_page_meta_boxes’, ‘jet-engine_page_post_types’ ) ) ) { return; } // Ajouter le bouton avec un comportement…Continue reading
/* * Include an invoice number into the set of Authorize.Net args. * * @link https://wpforms.com/developers/how-to-send-an-invoice-number-through-to-authorize-net-payments */ function wpf_dev_authorize_net_process_payment_single_add_invoice_to_args( $args, $process ) { // Replace 20 in $process->fields[20] to an id of your invoice field. if ( isset( $process->fields[20][ ‘value’…Continue reading
/** * @snippet Filter by Featured @ WooCommerce Products Admin * @how-to businessbloomer.com/woocommerce-customization * @author Rodolfo Melogli, Business Bloomer * @compatible WooCommerce 8 * @community https://businessbloomer.com/club/ */ add_filter( ‘woocommerce_products_admin_list_table_filters’, ‘bbloomer_featured_filter’ ); function bbloomer_featured_filter( $filters ) { $filters[‘featured_choice’] = ‘bbloomer_filter_by_featured’; return…Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading
function ciep_hide_mce_text_tab($settings) { $settings[‘quicktags’] = false; return $settings; } add_filter(‘wp_editor_settings’, ‘ciep_hide_mce_text_tab’);Continue reading
function CIEP_editor_settings($settings) { $settings[‘quicktags’] = false; return $settings; } add_filter(‘wp_editor_settings’, ‘CIEP_editor_settings’);Continue reading