Restore original WP admin bar after BuddyPress install [closed]
Since buddypress 1.5 you can use: define( ‘BP_USE_WP_ADMIN_BAR’, true ); I use it in bp-custom.php although it can go in wp-config.php
Since buddypress 1.5 you can use: define( ‘BP_USE_WP_ADMIN_BAR’, true ); I use it in bp-custom.php although it can go in wp-config.php
This code will do the job… <?php add_action(‘pre_get_posts’, ‘filter_posts_list’); function filter_posts_list($query) { //$pagenow holds the name of the current page being viewed, we want to run our code only on edit.php (posts list) global $pagenow; //If the ‘Editor’ is logged in, exclude ‘Admin’s posts if(current_user_can(‘editor’) && (‘edit.php’ == $pagenow)) { //global $query’s set() method for … Read more
I’m gonna post the CSS anyway because this is the best way to hide it. table.pages thead, table.pages tfoot { display:none; } I didn’t find any useful hooks in the source that would allow to pull the actual HTML for the table header and footer out.
You can use admin_url(‘nav-menus.php’); This function can be used to get url’s for any admin screen, please check out the codex for more information http://codex.wordpress.org/Function_Reference/admin_url
you should check out the other posts related to this. A lot of times you will have some type of malware in WordPress coded in PHP which screws with your JS codes. I have seen other threads on stack about similar points.. JavaScript widgets do not move and no ajax edits. Check out this stack … Read more
You can just use the built in ThickBox. Maybe not the pretties library but it does its job. Just add the class thickbox to the link and add the image to the href Here is a simple example: <?php echo ‘<a href=”https://wordpress.stackexchange.com/questions/78749/image.png” class=”thickbox”>’. __(‘Test image’, ‘domain’) .'</a>’; ?> Read more about ThickBox here.
Use the get_terms_args hook and modify the orderby argument, like so: add_filter( ‘get_terms_args’, ‘my_sort_terms’, 10, 2 ); function my_sort_terms( $args, $taxonomies ) { $args[‘orderby’] = ‘description’; return $args; } Possible values for this argument are listed in the codex.
Yes, that’s safe. I have done that. The core does not rely on the existence of such a user. There might be some broken plugins whose authors think user 1 is always there and an admin, they will not work properly. On the other hand, this is a very simple test for a plugin: If … Read more
Important: You shouldn’t modify core files, because you might loose all your edits in the next core upgrade. You should instead enqueue your own stylesheet with your custom CSS modifications through the admin_enqueue_scripts hook or use a hook like admin_head to implement your customization. Here’s an example: /** * Force #wpbody to the ‘ltr’ direction: … Read more
Check the constant DOING_AJAX. It is always defined when someone uses the WordPress AJAX API. if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) return; if ( is_admin() ) add_action( ‘admin_init’, ‘xcsn_redirect_from_admin’ );