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

Default, locked sorting of posting fields

I can answer the last part: “I also want the excerpt-field to be above the content-field. Is all this possible?” The only way to move anything above the content field is via JavaScript–there are no php hooks or filters up there. It’s kind of a lame workaround because you can usually see (visually) the jump … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)