Get email address of type Administrator

You can use this function to get email of all the Administrator on a WordPress website function get_administrator_email(){ $blogusers = get_users(‘role=Administrator’); //print_r($blogusers); foreach ($blogusers as $user) { echo $user->user_email; } }

Modify links under ‘help section’?

But for plugin pages,I can’t able to find the files to remove. For dealing with plugin/registered pages that you won’t necessarily know the hooks for, something like this will work… add_action( ‘admin_head’, ‘set_plugin_help_text’); function set_plugin_help_text() { global $_registered_pages; if( !empty( $_registered_pages ) ) foreach( array_keys( $_registered_pages ) as $hook ) add_contextual_help( $hook, “Your generic plugin … Read more

Use latest jQuery in WordPress (admin interface)

Starting with version 3.6 WordPress actively discourages from deregistering “critical” scripts in admin at all. For posed scope (loading newer jQuery in specific part of admin) it would make more sense to load custom copy of jQuery normally and use noConflict() on it right away to isolate it in own variable to be used in … Read more

Javascript not working in admin

Script concatenation in admin area is normal behavior, but I am not sure that trying to load that many scripts is. You can disable concatenation by defining CONCATENATE_SCRIPTS constant to false. In wp-config.php would be fitting: define(‘CONCATENATE_SCRIPTS’, false); See Disable_Javascript_Concatenation in Codex. W3TC shouldn’t affect anything on admin side.

How do I fix “You are not allowed to edit this item.” for Admins on existing posts?

I fixed this by editing /wp-includes/capabilities.php The code was function current_user_can( $capability ) { $current_user = wp_get_current_user(); if ( empty( $current_user ) ) return false; $args = array_slice( func_get_args(), 1 ); $args = array_merge( array( $capability ), $args ); return call_user_func_array( array( $current_user, ‘has_cap’ ), $args ); } and I changed it to function current_user_can( … Read more

Is it possible to hook AJAX to UPDATE-button?

If all you’re wanting to do is save extra post data you should not need jquery or custom ajax. WordPress has a built in action you can use to achieve this same thing. add_action( ‘save_post’, ‘save_more_post_meta’ ); function save_more_post_meta( $post_id ) { //save stuff here } If you need help with saving specifics i’ll need … Read more

What filter/action hook can I use to add a few links to the admin comments page?

There is no hook. The only place to print something to the screen is at the beginning of the field where $author_url = get_comment_author_url(); is executed. Sample: add_action( ‘load-edit-comments.php’, ‘wpse_64737_comment_actions’ ); function wpse_64737_comment_actions( $url=”” ) { if ( ‘load-edit-comments.php’ === current_filter() ) { add_filter( ‘get_comment_author_url’, __FUNCTION__ ); return; } echo ‘<p>Output in the Author field!</p>’; … Read more