mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Permalinks: Change structure tag button state more reliably.
Changes the highlighted tag buttons accordingly when selecting one of the commong permalink settings. Deprecates `options_permalink_add_js()` as that JavaScript isn't added inline anymore. Fixes #29872. git-svn-id: https://develop.svn.wordpress.org/trunk@41598 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -86,28 +86,6 @@ function options_general_add_js() {
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Display JavaScript on the page.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*/
|
||||
function options_permalink_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('.permalink-structure input:radio').change(function() {
|
||||
if ( 'custom' == this.value )
|
||||
return;
|
||||
jQuery('#permalink_structure').val( this.value );
|
||||
});
|
||||
jQuery( '#permalink_structure' ).on( 'click input', function() {
|
||||
jQuery( '#custom_selection' ).prop( 'checked', true );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Display JavaScript on the page.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user