Adding and removing columns from the admin pages panel
I think manage_edit-post_type_columns and manage_posts_custom_column is what you’re looking for:
I think manage_edit-post_type_columns and manage_posts_custom_column is what you’re looking for:
The code itself is fine. But you would need to activate the plug-in: you can’t simply place the file in the plug-ins directory. You will need to give the plug-in a ‘header’ too. See the Codex. Alternatively, place the code in your theme’s functions.php, but really it should be in a plug-in.
Goodness, that’s pretty funny! Try clearing your cookies. Specifically, there should be a cookie named “TinyMCE_content_size” which is most likely your culprit.
This is possible by altering the search query via the posts_search hook. http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php#L2202 A default search query will look like this: ..AND (((wp_posts.post_title LIKE \’%search terms%\’) OR (wp_posts.post_content LIKE \’%search terms%\’))) We need to remove the post content search, a regular expression should be enough. add_filter( ‘posts_search’, ‘wpse_45153_filter_search’, null, 2 ); function wpse_45153_filter_search( $search, $a_wp_query … Read more
Here is your answer: function remove_menus () { global $menu; if( (current_user_can(‘install_themes’)) ) { $restricted = array(); } // check if admin and hide nothing else { // for all other users if ($current_user->user_level < 10) $restricted = array(__(‘Dashboard’), __(‘Posts’), __(‘Media’), __(‘Links’), __(‘Pages’), __(‘Appearance’), __(‘Tools’), __(‘Users’), __(‘Settings’), __(‘Comments’), __(‘Plugins’)); // this removes a lot! Just … Read more
You action filter is wrong. First change this function name function register_scripts , it’s a bad name, use something unique. Second change add_action (“admin_print_styles-post.php”, “payee_init”); to a proper hook like add_action (“wp_enqueue_scripts”, “payee_init”); http://codex.wordpress.org/Function_Reference/wp_enqueue_script
It might be due to the position on the admin sidebar in Simply Poll. Go to simply-poll/lib/admin.php and on line 40 remove the , 6 from the end of the add_menu_page() function and see what happens. I’ll have a look at the other plugin as well to check what they are doing. Simply Poll developer
Thanks Michael for the tip. I finally got it. The solution is as follows: $options[] = array( “section” => “zzz”, “id” => HS_SHORTNAME . “_multicheckbox_inputs”, “title” => __( ‘Multi-Checkbox’, ‘hs_textdomain’ ), “desc” => __( ‘Some Description’, ‘hs_textdomain’ ), “type” => “multi-checkbox”, “std” => ”, “choices” => my_list_cats() ); And in functions.php: function my_list_cats() { $cats … Read more
I don’t know of any plugins that do this, and I’m not sure you’ll find one. The closest I can find is the “Mandatory Field” plugin. The specific tasks that you might want are so varied, that I wonder whether a non-bloated plugin that let you customize the validation is out there. With that said, … Read more
It uses get_terms and wp_get_object_terms internally to get the categories. You can achieve what you want using a filter associated with these functions. <?php //$args = apply_filters( ‘get_terms_args’, $args, $taxonomies ); add_filter(‘get_terms_args’, ‘wpse53900_filter_cat’); function wpse53900_filter_cat($args, $taxonomies){ //this is where you can check the taxonomies and roles to filter out the ones you want //additionally, make … Read more