Warning: This function has been deprecated.

options_permalink_add_js() WordPress Function

The options_permalink_add_js() function is used to add JavaScript to the "Permalink" page in the WordPress admin. This function is called when the "Permalink" page is loaded.

options_permalink_add_js() #

Display JavaScript on the page.


Source

File: wp-admin/includes/deprecated.php

function options_permalink_add_js() {
	?>
	<script type="text/javascript">
		jQuery( 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
}

Top ↑

Changelog

Changelog
VersionDescription
4.9.0This function has been deprecated.
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More