Created
December 23, 2014 18:26
-
-
Save mohsinrasool/1ab5430fab097eb5863b to your computer and use it in GitHub Desktop.
Enable the "Minor edit - dont'update translation" by WPML checkbox by default on post editing screen
This file contains hidden or 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
/** | |
* Javascript added in admin screens | |
* 1. Enable the "Minor edit - dont'update translation" by WPML checkbox by default on post editing screen | |
* | |
* @return void | |
* @author mohsinrasool | |
**/ | |
add_action('admin_footer', 'mr_admin_footer'); | |
function mr_admin_footer() | |
{ | |
global $pagenow; | |
// $screen = get_current_screen(); | |
if ( $pagenow == 'post.php' ) { | |
// 1. Enable the "Minor edit - dont'update translation" by WPML checkbox by default on post editing screen | |
?> | |
<script type="text/javascript"> | |
jQuery('input[name="icl_minor_edit"]').attr('checked','checked'); | |
</script> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment