// 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
/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading