Add duplicate link to admin bar menu (copy)

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 duplicate link to admin bar menu

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

Duplicate Page-Post-CPT

/** * 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

Intercom Messenger Hash

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

Add Readonly And Disabled to ACF

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