Hooks: admin_footer and admin_print_footer_scripts not working?

As per WordPress Codex its best to register and queue your scripts with the hook dedicated for them, even if you want your script to be added to footer. So the correct way of doing it will be: function jupload_scripts() { wp_enqueue_script( ‘jquery-ui’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js’, array(‘jquery’), ‘1.8.6’, true ); } add_action( ‘admin_print_scripts’, ‘jupload_scripts’ );

Disable or lock parent pages from being edited in wordpress admin

Yes there is. Save this code as plugin and activate one. Plugin will lock all pages that has children from edit. <?php /* Plugin Name: Lock parent pages form edit Plugin URI: Description: Version: 0.1 Author: Alexey Selin <[email protected]> Author URI: http://wordpress.stackexchange.com/users/7314/alexey */ function lock_parent_pages_from_edit( $capauser, $capask, $param){ global $wpdb; $post = get_post( $param[2] ); … Read more

get_current_screen and the WP_Screen class

wp_enqueue_scripts is only fired on the front end, and not on admin screens. For loading scripts admin side, you’ll want the hook admin_enqueue_scripts. Passed as an optional argument is the page hook. (Examples include edit.php, for the admin edit page (which lists pages/posts/ cpt posts), post.php when editing a post/ custom post type and post-new.php … Read more

Migrated wordpress site give “Undefined variable: php” warnings

Notices won’t trigger a server 500 error. However, “fatal errors” will. From your logs above: Fatal error: Class ‘Memcache’ not found in /var/www/wordpress/wp-content/plugins/flexicache/FlexiCache/Store/Memcache.php on line 63 This means you’re running a plugin that depends on Memcache and your local system doesn’t have Memcache support. Disable or remove the FlexiCache plugin, or install Memcache. One other … Read more

Custom Field values not Showing in Edit Page of Custom Post Type

Whenever in doubt about the functioning of WordPress functions, consult the Codex: http://codex.wordpress.org/Function_Reference/register_post_type There, we can see that when registering a post type the supports argument has many options, one of them custom-fields. So, this would enable the CF box for the CPT: $args = array( ‘labels’ => $labels, ‘public’ => true, ‘publicly_queryable’ => true, … Read more