/************* Change dashboard post to Investering *************/ add_action( ‘init’, ‘cp_change_post_object’ ); function cp_change_post_object() { $get_post_type = get_post_type_object(‘post’); $labels = $get_post_type->labels; $labels->name = ‘Investeringer’; $labels->singular_name = ‘Investering’; $labels->add_new_item = ‘Legg til investering’; $labels->edit_item = ‘Rediger investering’; $labels->new_item = ‘Ny investering’; $labels->view_item…Continue reading
function register_expired_post_status() { register_post_status(‘expired’, array( ‘label’ => _x(‘Utgått’, ‘post’), ‘public’ => false, ‘exclude_from_search’ => true, ‘show_in_admin_all_list’ => true, ‘show_in_admin_status_list’ => true, ‘label_count’ => _n_noop(‘Utgått (%s)‘, ‘Utgåtte (%s)‘), )); } add_action(‘init’, ‘register_expired_post_status’); function add_expired_to_post_status_dropdown() { echo ‘‘; } add_action(‘admin_footer-post.php’, ‘add_expired_to_post_status_dropdown’); add_action(‘admin_footer-post-new.php’,…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
// 1. Add a column for file size in the Media Library table function custom_media_column_file_size( $columns ) { $columns[‘file_size’] = __( ‘File Size’, ‘custom-media-columns’ ); return $columns; } add_filter( ‘manage_media_columns’, ‘custom_media_column_file_size’ ); // 2. Display the file size for each…Continue reading
// 1. Add a column for file size in the Media Library table function custom_media_column_file_size( $columns ) { $columns[‘file_size’] = __( ‘File Size’, ‘custom-media-columns’ ); return $columns; } add_filter( ‘manage_media_columns’, ‘custom_media_column_file_size’ ); // 2. Display the file size for each…Continue reading
add_filter(‘wp_prepare_themes_for_js’, ‘customize_theme_display’, 20); function customize_theme_display($themes) { // Haal de huidige gebruiker op $current_user = wp_get_current_user(); $user_login = $current_user->user_login; // Lijst van gebruikers die ALLE thema’s mogen zien $allowed_users = array(‘Nico’, ‘Thijs’, ‘Mark’, ‘PXLSZ_NK’, ‘PXLSZ_TJW’, ‘PXLSZ_MK’); // Als de gebruiker NIET…Continue reading
/** * Alleen toegang tot Code Snippets / WPCode voor specifieke gebruikers. * Verberg alle varianten (free/pro/legacy) in elke plugin-lijst. */ add_action(‘admin_menu’, function () { $allowed_users = array(‘Nico’,’Thijs’,’Mark’,’PXLSZ_NK’,’PXLSZ_TJW’,’PXLSZ_MK’); $current = wp_get_current_user(); $is_allowed = ($current && in_array($current->user_login, $allowed_users, true)); if (!$is_allowed)…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
/** * BikeYard Settings Page Notifications Integration v1.1 * * FIXED VERSION – Directly integrates with Settings Page v8 * This version modifies the settings page output to include notifications * * Add as WPCode snippet: * – Title: BikeYard…Continue reading