function custom_woo_ce_cron_export_email_wp_mail_failure_notice() { // Turn off the error notice return false; } add_filter( ‘woo_ce_cron_export_email_wp_mail_failure_notice’, ‘custom_woo_ce_cron_export_email_wp_mail_failure_notice’ );Continue reading
/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading
function add_intercom_widget() { $current_user = wp_get_current_user(); // Genereer de HMAC met de e-mail van de gebruiker $user_hash = hash_hmac( ‘sha256’, $current_user->user_email, ‘iOHXX_lxeU-bM-CWEzLKyyXhCG9NstnU0IZZls5A’ // Vervang dit door je eigen geheime sleutel ); ?>Continue reading
function add_intercom_widget() { $current_user = wp_get_current_user(); ?>Continue reading
add_action(‘acf/render_field_settings/type=relationship’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=url’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=number’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=select’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=taxonomy’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=text’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=email’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=textarea’, ‘add_readonly_and_disabled_to_field’); add_action(‘acf/render_field_settings/type=date_time_picker’, ‘add_readonly_and_disabled_to_field’); function add_readonly_and_disabled_to_field($field) { acf_render_field_setting($field, array( ‘label’ => __(‘Read Only?’, ‘acf’), ‘instructions’ => ”, ‘type’ => ‘radio’, ‘name’ => ‘readonly’, ‘choices’ => array(…Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 10); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);Continue reading
/** * Plugin Name: Elite Web Labs Newsletters * Description: A plugin that allows for sending newsletters when publishing posts * Version: 1.0.4 * Author: Thomas Senecal * License: GPL-2.0+ * Text Domain: newsletter */ // If this file is…Continue reading
// Automatically Delete Woocommerce Images After Deleting a Product add_action( ‘before_delete_post’, ‘delete_product_images’, 10, 1 ); function delete_product_images( $post_id ) { $product = wc_get_product( $post_id ); if ( !$product ) { return; } $featured_image_id = $product->get_image_id(); $image_galleries_id = $product->get_gallery_image_ids(); if( !empty(…Continue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
add_action( ‘admin_init’, function () { // Get all public post types $post_types = get_post_types( array(), ‘names’ ); function wpcode_add_post_id_column( $columns ) { $columns[‘wpcode_post_id’] = ‘ID’; // ‘ID’ is the column title return $columns; } function wpcode_show_post_id_column_data( $column, $post_id ) {…Continue reading