Tag Info

Hot answers tagged

4

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it's a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ...


2

WordPress doesn't have built-in features for a site that is served in multiple languages. Yes WordPress has features for translating the UI labels into different languages, but not for the actual content. You are going to need to use a plugin that basically keeps multiple versions of each Post for each language and has means for the user to select the ...


2

Of course you can specify only the items you want to remove. Have a look in the code below: /wordpress/wp-content/plugins/your_plugin/your_plugin.php : add_action('admin_init', 'nwcm_admin_init'); function nwcm_admin_init() { // Remove unnecessary menus $menus_to_remove = array( // menu items you want to remove 'menu_item_1', ...


2

thanks @birgire with your help i change the code to make this work. everyone that looking for the same solution you can use this code: add_action( 'load-index.php', 'show_welcome_panel' ); function show_welcome_panel() { $user_id = get_current_user_id(); if ( 1 != get_user_meta( $user_id, 'show_welcome_panel', true ) ) update_user_meta( ...


1

In WP terminology these are called Views. They are pretty generic, implemented on WP_List_Table level and passed through dynamic views_{$this->screen->id} filter. Killing them completely for your requirements is as simple as: add_filter( 'views_users', '__return_empty_array' ); Of course you might want to do something more thorough, like modifying ...


1

It's not the most elegant solution but it works. Thanks to G.M. for pointing me in the right direction. This filter passes us an array of views. The format is something like this: array( 'list-item-class' => 'list-item-content' ); So What I ended up doing was adding my description as the first index in the array so that it was easy to manipulate: ...


1

That's why the last line of the get_admin_url contains the line: return apply_filters( 'admin_url', $url, $path, $blog_id ); Any valid modification of the admin URL will be via that filter, so get_admin_url is the correct function to use in all cases.


1

One of possible reason is you/automated installation might have turned off installation of new themes and plugins in wp-config.php. Make sure you do not have DISALLOW_FILE_MODS true in your wp-config.php file. define( 'DISALLOW_FILE_MODS', true ); If it is then remove this line. Enabling this option in config file will disallow updates and installations ...


1

Please refer below : function disable_new_posts() { // Hide sidebar link global $submenu; unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]); // Hide link on listing page if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') { echo '<style type="text/css"> #favorite-actions, .add-new-h2, .tablenav { ...



Only top voted, non community-wiki answers of a minimum length are eligible