Pristine upstream, unpacked from the official wordpress.org tarball. https://wordpress.org/wordpress-7.1.1.tar.gz sha1 2a9d68474e8703aa3a66f80427b325e0941b6a1e (published by wordpress.org) sha256 3996fee13448ef12e07e9f0c77db2f655ffa1b7cde71c80a4965d3bf1fb956b3 This branch carries nothing but upstream releases, one commit each, and is never edited. It is the other side of the git-subtree merge that brings security releases into SiriusPress/wordpress/ — see SiriusPress/docs/upstream-merges.md.
51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Customize API: WP_Customize_Nav_Menu_Auto_Add_Control class
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Customize
|
|
* @since 4.4.0
|
|
*/
|
|
|
|
/**
|
|
* Customize control to represent the auto_add field for a given menu.
|
|
*
|
|
* @since 4.3.0
|
|
*
|
|
* @see WP_Customize_Control
|
|
*/
|
|
class WP_Customize_Nav_Menu_Auto_Add_Control extends WP_Customize_Control {
|
|
|
|
/**
|
|
* Type of control, used by JS.
|
|
*
|
|
* @since 4.3.0
|
|
* @var string
|
|
*/
|
|
public $type = 'nav_menu_auto_add';
|
|
|
|
/**
|
|
* No-op since we're using JS template.
|
|
*
|
|
* @since 4.3.0
|
|
*/
|
|
protected function render_content() {}
|
|
|
|
/**
|
|
* Render the Underscore template for this control.
|
|
*
|
|
* @since 4.3.0
|
|
*/
|
|
protected function content_template() {
|
|
?>
|
|
<# var elementId = _.uniqueId( 'customize-nav-menu-auto-add-control-' ); #>
|
|
<span class="customize-control-title"><?php _e( 'Menu Options' ); ?></span>
|
|
<span class="customize-inside-control-row">
|
|
<input id="{{ elementId }}" type="checkbox" class="auto_add" />
|
|
<label for="{{ elementId }}">
|
|
<?php _e( 'Automatically add new top-level pages to this menu' ); ?>
|
|
</label>
|
|
</span>
|
|
<?php
|
|
}
|
|
}
|