Skip to content

Instantly share code, notes, and snippets.

@DumahX
Created April 21, 2023 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DumahX/f1b589a850a1f2d2d5d36ff4e97b5f67 to your computer and use it in GitHub Desktop.
Save DumahX/f1b589a850a1f2d2d5d36ff4e97b5f67 to your computer and use it in GitHub Desktop.
Default "Parameter Forwarding" option to Enabled for new pretty links
<?php
add_action( 'admin_footer', function() {
$screen = get_current_screen();
if ( 'pretty-link' == $screen->id ) {
?>
<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( '#param_forwarding' ).prop( "checked", true );
} );
</script>
<?php
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment