Last active
November 20, 2015 22:22
-
-
Save kraftbj/cec8399dd893cf9b8b4d to your computer and use it in GitHub Desktop.
Force Publicize's post editor settings to expand.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not include in an existing PHP file or you can upload this entire file as a plugin. | |
/* | |
* Plugin Name: Jetpack: Auto-Expand Publicize Settings | |
* Plugin URI: http://jetpack.me | |
* Description: Custom plugin to auto-expand the Publicize settings when writing a post. | |
* Author: Brandon Kraft | |
* Version: 1.0.0 | |
* Author URI: https://kraft.im/ | |
* License: GPL2+ | |
*/ | |
add_action( 'admin_head-post.php', 'kraft_auto_open_pub_meta' ); | |
add_action( 'admin_head-post-new.php', 'kraft_auto_open_pub_meta' ); | |
function kraft_auto_open_pub_meta() { ?> | |
<script type="text/javascript"> | |
jQuery(window).load(function(){ | |
jQuery('#publicize-form-edit').trigger('click'); | |
}); | |
</script> | |
<?php } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment