WP CLI theme install. Install a private repo?

I actually figured out a way to do this. First you use wget like this: wget –user username –ask-password -O path/to/output.zip https://bitbucket.org/path/to/file.zip the -O flag specifies output and output.zip is where you want it to download to. Then you can run: wp theme install path/to/output.zip –activate Happy days

How to cancel `wp_print_scripts`?

There is a way, but it’s not recommended since there might be some other inline scripts attached to the enqueued scripts. You can hook to the wp_enqueue_scripts action and empty the global $wp_scripts as follows: add_action( ‘wp_enqueue_scripts’, ‘remove_all_scripts’, 1000 ); function remove_all_scripts() { global $wp_scripts; $wp_scripts->queue = array(); } You can then run a loop … Read more

How can I selectively print scripts to the footer of certain admin pages?

There’s an in_footer parameter that you can pass to wp_enqueue_scripts – does that work? I would hook to admin_enqueue_scripts, check the $page for location, and enqueue your script there, with ‘in_footer’ as true. Example: add_action( ‘admin_enqueue_scripts’, ‘enqueue_my_script’ ); function enqueue_my_script( $page ) { if ($page !== ‘edit.php’) return; wp_enqueue_script( ‘my-script’, ‘http://path/to/my/local/script’, null, null, true ); … Read more

Question about the way that wp_register_script works

For the record this entirely the wrong thing to do. Themes should avoid (read never!) de-register the WordPress registered jQuery scripts (plug-ins should absolutely never do this). If a theme is to de-register the jquery script (to replace it) then it should re-register it properly: wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js’); Here-in lies the problem. The above is … Read more