Prevent WordPress from abbreviating-long-slugs…-in-the-admin

There is a filter at the end of the function: ‘get_sample_permalink_html’. Hook into this and just replace the shortened form with the full length. <?php # -*- coding: utf-8 -*- /* Plugin Name: T5 Unabridge Permalink Slug */ add_filter( ‘get_sample_permalink_html’, ‘t5_unabridge_sample_permalink’, 10, 2 ); /** * Replaces the shortened permalink with its full form. * … Read more

Prevent widgets removal

The solution I can think of is removing the panels Available and Inactive Widgets so there’s simply nowhere to drag (and delete) the widgets used in the sidebar. You can inject something else to fill the gap. In this example, only one user is able to add/delete widgets. function wpse_53398_script_printer(){ // used to display the … Read more

How to hide admin account in BuddyPress? (for security reasons)

I found this: Exclude Users from Members directory on a BuddyPress based social network We will need to hook to ‘bp_ajax_querystring’ filter. The following code will allow to exclude the users from the members directory. They will be still listed in the friends list of other users with whom they are friends with. add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2); function … Read more

WP List Table custom quick edit box – post meta data missing and columns change on submit

I just run in the same error when adding extra columns to the default post types. The offending line was the $pagenow check. Quick Edit uses admin-ajax.php so it doesn’t renders the custom columns when it’s done. This doesn’t work: if( ‘edit.php’ == $pagenow && is_admin() ) { add_action( ‘admin_init’, array( $this, ‘init_id_column’ ), 999 … Read more