Cores especificas para cada status do posts/pages
/*———————————————– Distinto color segun estado de entrada ———————————————–*/ function posts_status_color() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/*———————————————– Distinto color segun estado de entrada ———————————————–*/ function posts_status_color() { ?>Continue reading
add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading
add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading
add_filter( ‘acf/admin/prevent_escaped_html_notice’, ‘__return_true’ );Continue reading
// Add a hook. function custom_as_retention_period( ) { return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’, 10 );Continue reading
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