// Gutenberg für Beiträge und Seiten deaktivieren add_filter(‘use_block_editor_for_post’, ‘__return_false’); add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 10, 2); // Klassische Widgets wiederherstellen add_filter(‘use_widgets_block_editor’, ‘__return_false’); // Menüverwaltung sicherstellen (optional) add_filter(‘gutenberg_use_widgets_block_editor’, ‘__return_false’); // Gutenberg-Styles aus dem Frontend entfernen add_action(‘wp_enqueue_scripts’, function () { wp_dequeue_style(‘wp-block-library’); // Standard Block-Styles wp_dequeue_style(‘wp-block-library-theme’);…Continue reading
// Beitragsbilder in der Beitragsübersicht anzeigen function add_thumbnail_column($columns) { $columns[‘thumbnail’] = __(‘Beitragsbild’); return $columns; } function show_thumbnail_column($column, $post_id) { if ($column === ‘thumbnail’) { echo get_the_post_thumbnail($post_id, [50, 50]); } } add_filter(‘manage_posts_columns’, ‘add_thumbnail_column’); add_action(‘manage_posts_custom_column’, ‘show_thumbnail_column’, 10, 2);Continue reading
function generate_bulk_invoices() { if( isset( $_REQUEST[ ‘generate-invoices’ ] ) ) { global $wpdb; $query = “SELECT id FROM {$wpdb->prefix}mepr_transactions WHERE status in (‘complete’, ‘confirmed’, ‘refunded’)”; $txn_ids = $wpdb->get_results( $query ); foreach( $txn_ids as $txn_id ) { $invoices = new MePdfInvoicesCtrl();…Continue reading
function mepr_currency_codes( $codes ) { array_push( $codes, ‘EGP’ ); // Adds ‘EGP’ to the list of currency codes. To add a different currency, replace EGP with the three-letter currency code of the needed currency. return $codes; // Return the modified…Continue reading
add_filter( ‘mepr-paywall-cookie-time’, function( $expire_time ) { // Set cookie expiration time to X days (replace X with the number of days) $expire_time = ( time() + 60 * 60 * 24 * X ); // X represents the number of…Continue reading
function add_currency_below_total() { $currency = get_woocommerce_currency(); // Get currency code (e.g., USD, CAD, EUR) echo ‘ ‘ . __(‘Currency’, ‘woocommerce’) . ‘ ‘ . esc_html($currency) . ‘ ‘; } add_action(‘woocommerce_review_order_after_order_total’, ‘add_currency_below_total’);Continue reading
12873467-3b1b-467f-9a92-96a696e8a1c5Continue reading
//* Hacemos que si el usuario está conectado y no es 1, no aparezcan notificaciones de actualizaciones add_action( ‘init’, function() { global $current_user; if (is_user_logged_in() && $current_user->ID != 1) { /* Aviso de actualizaciones*/ add_action( ‘admin_head’, function(){ remove_action( ‘admin_notices’, ‘update_nag’,…Continue reading
function wpcode_send_new_user_notifications( $user_id, $notify = ‘user’ ) { if ( empty( $notify ) || ‘admin’ === $notify ) { return; } elseif ( ‘both’ === $notify ) { // Send new users the email but not the admin. $notify =…Continue reading