H69UNtblNBNpha2dtB1Odn8qYp1Qk5NK2gi7yfceofo9N
e:
/
home
/
ajudasindico
/
Web
/
wp-includes
/
Nama File / Folder
Size
Action
ID3
--
NONE
IXR
--
NONE
PHPMailer
--
NONE
Requests
--
NONE
SimplePie
--
NONE
Text
--
NONE
assets
--
NONE
block-patterns
--
NONE
block-supports
--
NONE
blocks
--
NONE
certificates
--
NONE
css
--
NONE
customize
--
NONE
fonts
--
NONE
images
--
NONE
js
--
NONE
php-compat
--
NONE
pomo
--
NONE
random_compat
--
NONE
rest-api
--
NONE
sitemaps
--
NONE
sodium_compat
--
NONE
theme-compat
--
NONE
widgets
--
NONE
admin-bar.php
32.69KB
Hapus
Edit
Rename
atomlib.php
11.668KB
Hapus
Edit
Rename
author-template.php
16.631KB
Hapus
Edit
Rename
block-editor.php
18.371KB
Hapus
Edit
Rename
block-i18n.json
0.309KB
Hapus
Edit
Rename
block-patterns.php
4.191KB
Hapus
Edit
Rename
block-template-utils.php
29.572KB
Hapus
Edit
Rename
block-template.php
10.521KB
Hapus
Edit
Rename
blocks.php
42.222KB
Hapus
Edit
Rename
bookmark-template.php
12.598KB
Hapus
Edit
Rename
bookmark.php
14.973KB
Hapus
Edit
Rename
cache-compat.php
1.021KB
Hapus
Edit
Rename
cache.php
9.29KB
Hapus
Edit
Rename
canonical.php
32.31KB
Hapus
Edit
Rename
capabilities.php
34.884KB
Hapus
Edit
Rename
category-template.php
54.396KB
Hapus
Edit
Rename
category.php
12.414KB
Hapus
Edit
Rename
class-IXR.php
2.483KB
Hapus
Edit
Rename
class-feed.php
0.517KB
Hapus
Edit
Rename
class-http.php
0.364KB
Hapus
Edit
Rename
class-json.php
42.423KB
Hapus
Edit
Rename
class-oembed.php
0.397KB
Hapus
Edit
Rename
class-phpass.php
6.542KB
Hapus
Edit
Rename
class-phpmailer.php
0.648KB
Hapus
Edit
Rename
class-pop3.php
20.349KB
Hapus
Edit
Rename
class-requests.php
29.718KB
Hapus
Edit
Rename
class-simplepie.php
95.781KB
Hapus
Edit
Rename
class-smtp.php
0.446KB
Hapus
Edit
Rename
class-snoopy.php
36.831KB
Hapus
Edit
Rename
class-walker-category-dropdown.php
2.412KB
Hapus
Edit
Rename
class-walker-category.php
8.27KB
Hapus
Edit
Rename
class-walker-comment.php
13.878KB
Hapus
Edit
Rename
class-walker-nav-menu.php
9.13KB
Hapus
Edit
Rename
class-walker-page-dropdown.php
2.646KB
Hapus
Edit
Rename
class-walker-page.php
7.421KB
Hapus
Edit
Rename
class-wp-admin-bar.php
17.052KB
Hapus
Edit
Rename
class-wp-ajax-response.php
5.117KB
Hapus
Edit
Rename
class-wp-application-passwords.php
11.948KB
Hapus
Edit
Rename
class-wp-block-editor-context.php
0.869KB
Hapus
Edit
Rename
class-wp-block-list.php
4.612KB
Hapus
Edit
Rename
class-wp-block-parser.php
14.861KB
Hapus
Edit
Rename
class-wp-block-pattern-categories-registry.php
4.431KB
Hapus
Edit
Rename
class-wp-block-patterns-registry.php
5.796KB
Hapus
Edit
Rename
class-wp-block-styles-registry.php
4.882KB
Hapus
Edit
Rename
class-wp-block-supports.php
5.172KB
Hapus
Edit
Rename
class-wp-block-template.php
1.773KB
Hapus
Edit
Rename
class-wp-block-type-registry.php
4.533KB
Hapus
Edit
Rename
class-wp-block-type.php
9.27KB
Hapus
Edit
Rename
class-wp-block.php
7.991KB
Hapus
Edit
Rename
class-wp-comment-query.php
46.334KB
Hapus
Edit
Rename
class-wp-comment.php
9.103KB
Hapus
Edit
Rename
class-wp-customize-control.php
25.108KB
Hapus
Edit
Rename
class-wp-customize-manager.php
196.558KB
Hapus
Edit
Rename
class-wp-customize-nav-menus.php
55.448KB
Hapus
Edit
Rename
class-wp-customize-panel.php
10.192KB
Hapus
Edit
Rename
class-wp-customize-section.php
10.716KB
Hapus
Edit
Rename
class-wp-customize-setting.php
29.082KB
Hapus
Edit
Rename
class-wp-customize-widgets.php
69.517KB
Hapus
Edit
Rename
class-wp-date-query.php
34.173KB
Hapus
Edit
Rename
class-wp-dependency.php
2.452KB
Hapus
Edit
Rename
class-wp-editor.php
69.537KB
Hapus
Edit
Rename
class-wp-embed.php
15.567KB
Hapus
Edit
Rename
class-wp-error.php
7.131KB
Hapus
Edit
Rename
class-wp-fatal-error-handler.php
7.397KB
Hapus
Edit
Rename
class-wp-feed-cache-transient.php
2.5KB
Hapus
Edit
Rename
class-wp-feed-cache.php
0.947KB
Hapus
Edit
Rename
class-wp-hook.php
15.323KB
Hapus
Edit
Rename
class-wp-http-cookie.php
7.213KB
Hapus
Edit
Rename
class-wp-http-curl.php
12.099KB
Hapus
Edit
Rename
class-wp-http-encoding.php
6.507KB
Hapus
Edit
Rename
class-wp-http-ixr-client.php
3.394KB
Hapus
Edit
Rename
class-wp-http-proxy.php
5.82KB
Hapus
Edit
Rename
class-wp-http-requests-hooks.php
1.938KB
Hapus
Edit
Rename
class-wp-http-requests-response.php
4.241KB
Hapus
Edit
Rename
class-wp-http-response.php
2.882KB
Hapus
Edit
Rename
class-wp-http-streams.php
16.259KB
Hapus
Edit
Rename
class-wp-http.php
38.974KB
Hapus
Edit
Rename
class-wp-image-editor-gd.php
15.295KB
Hapus
Edit
Rename
class-wp-image-editor-imagick.php
26.329KB
Hapus
Edit
Rename
class-wp-image-editor.php
16.262KB
Hapus
Edit
Rename
class-wp-list-util.php
6.825KB
Hapus
Edit
Rename
class-wp-locale-switcher.php
4.904KB
Hapus
Edit
Rename
class-wp-locale.php
13.654KB
Hapus
Edit
Rename
class-wp-matchesmapregex.php
1.758KB
Hapus
Edit
Rename
class-wp-meta-query.php
29.471KB
Hapus
Edit
Rename
class-wp-metadata-lazyloader.php
5.227KB
Hapus
Edit
Rename
class-wp-network-query.php
18.722KB
Hapus
Edit
Rename
class-wp-network.php
12.089KB
Hapus
Edit
Rename
class-wp-object-cache.php
13.233KB
Hapus
Edit
Rename
class-wp-oembed-controller.php
6.667KB
Hapus
Edit
Rename
class-wp-oembed.php
29.982KB
Hapus
Edit
Rename
class-wp-paused-extensions-storage.php
4.808KB
Hapus
Edit
Rename
class-wp-post-type.php
20.72KB
Hapus
Edit
Rename
class-wp-post.php
6.272KB
Hapus
Edit
Rename
class-wp-query.php
135.702KB
Hapus
Edit
Rename
class-wp-recovery-mode-cookie-service.php
6.308KB
Hapus
Edit
Rename
class-wp-recovery-mode-email-service.php
10.41KB
Hapus
Edit
Rename
class-wp-recovery-mode-key-service.php
4.17KB
Hapus
Edit
Rename
class-wp-recovery-mode-link-service.php
3.321KB
Hapus
Edit
Rename
class-wp-recovery-mode.php
11.111KB
Hapus
Edit
Rename
class-wp-rewrite.php
61.486KB
Hapus
Edit
Rename
class-wp-role.php
2.439KB
Hapus
Edit
Rename
class-wp-roles.php
8.236KB
Hapus
Edit
Rename
class-wp-session-tokens.php
7.251KB
Hapus
Edit
Rename
class-wp-simplepie-file.php
3.183KB
Hapus
Edit
Rename
class-wp-simplepie-sanitize-kses.php
1.733KB
Hapus
Edit
Rename
class-wp-site-query.php
29.648KB
Hapus
Edit
Rename
class-wp-site.php
7.254KB
Hapus
Edit
Rename
class-wp-tax-query.php
18.993KB
Hapus
Edit
Rename
class-wp-taxonomy.php
13.409KB
Hapus
Edit
Rename
class-wp-term-query.php
37.178KB
Hapus
Edit
Rename
class-wp-term.php
5.148KB
Hapus
Edit
Rename
class-wp-text-diff-renderer-inline.php
0.699KB
Hapus
Edit
Rename
class-wp-text-diff-renderer-table.php
16.401KB
Hapus
Edit
Rename
class-wp-theme-json-resolver.php
14.063KB
Hapus
Edit
Rename
class-wp-theme-json-schema.php
4.195KB
Hapus
Edit
Rename
class-wp-theme-json.php
61.309KB
Hapus
Edit
Rename
class-wp-theme.php
52.563KB
Hapus
Edit
Rename
class-wp-user-meta-session-tokens.php
2.92KB
Hapus
Edit
Rename
class-wp-user-query.php
37.177KB
Hapus
Edit
Rename
class-wp-user-request.php
2.145KB
Hapus
Edit
Rename
class-wp-user.php
21.702KB
Hapus
Edit
Rename
class-wp-walker.php
12.707KB
Hapus
Edit
Rename
class-wp-widget-factory.php
3.243KB
Hapus
Edit
Rename
class-wp-widget.php
17.723KB
Hapus
Edit
Rename
class-wp-xmlrpc-server.php
207.944KB
Hapus
Edit
Rename
class-wp.php
24.67KB
Hapus
Edit
Rename
class.wp-dependencies.php
13.68KB
Hapus
Edit
Rename
class.wp-scripts.php
18.5KB
Hapus
Edit
Rename
class.wp-styles.php
10.626KB
Hapus
Edit
Rename
comment-template.php
93.813KB
Hapus
Edit
Rename
comment.php
123.567KB
Hapus
Edit
Rename
compat.php
14.524KB
Hapus
Edit
Rename
cron.php
39.899KB
Hapus
Edit
Rename
date.php
0.396KB
Hapus
Edit
Rename
default-constants.php
10.017KB
Hapus
Edit
Rename
default-filters.php
30.728KB
Hapus
Edit
Rename
default-widgets.php
2.17KB
Hapus
Edit
Rename
deprecated.php
121.944KB
Hapus
Edit
Rename
embed-template.php
0.333KB
Hapus
Edit
Rename
embed.php
36.05KB
Hapus
Edit
Rename
error-protection.php
4.021KB
Hapus
Edit
Rename
feed-atom-comments.php
5.316KB
Hapus
Edit
Rename
feed-atom.php
2.977KB
Hapus
Edit
Rename
feed-rdf.php
2.605KB
Hapus
Edit
Rename
feed-rss.php
1.161KB
Hapus
Edit
Rename
feed-rss2-comments.php
3.975KB
Hapus
Edit
Rename
feed-rss2.php
3.71KB
Hapus
Edit
Rename
feed.php
22.428KB
Hapus
Edit
Rename
formatting.php
318.689KB
Hapus
Edit
Rename
functions.php
251.333KB
Hapus
Edit
Rename
functions.wp-scripts.php
13.121KB
Hapus
Edit
Rename
functions.wp-styles.php
8.37KB
Hapus
Edit
Rename
general-template.php
155.356KB
Hapus
Edit
Rename
global-styles-and-settings.php
6.21KB
Hapus
Edit
Rename
http.php
22.463KB
Hapus
Edit
Rename
https-detection.php
6.701KB
Hapus
Edit
Rename
https-migration.php
4.619KB
Hapus
Edit
Rename
kses.php
67.492KB
Hapus
Edit
Rename
l10n.php
57.655KB
Hapus
Edit
Rename
link-template.php
145.705KB
Hapus
Edit
Rename
load.php
49.001KB
Hapus
Edit
Rename
locale.php
0.158KB
Hapus
Edit
Rename
media-template.php
58.967KB
Hapus
Edit
Rename
media.php
180.748KB
Hapus
Edit
Rename
meta.php
61.213KB
Hapus
Edit
Rename
ms-blogs.php
24.584KB
Hapus
Edit
Rename
ms-default-constants.php
4.652KB
Hapus
Edit
Rename
ms-default-filters.php
6.35KB
Hapus
Edit
Rename
ms-deprecated.php
20.634KB
Hapus
Edit
Rename
ms-files.php
2.592KB
Hapus
Edit
Rename
ms-functions.php
91.922KB
Hapus
Edit
Rename
ms-load.php
19.322KB
Hapus
Edit
Rename
ms-network.php
3.575KB
Hapus
Edit
Rename
ms-settings.php
4.027KB
Hapus
Edit
Rename
ms-site.php
38.679KB
Hapus
Edit
Rename
nav-menu-template.php
22.75KB
Hapus
Edit
Rename
nav-menu.php
41.552KB
Hapus
Edit
Rename
option.php
75.102KB
Hapus
Edit
Rename
pluggable-deprecated.php
6.116KB
Hapus
Edit
Rename
pluggable.php
101.957KB
Hapus
Edit
Rename
plugin.php
33.414KB
Hapus
Edit
Rename
post-formats.php
6.913KB
Hapus
Edit
Rename
post-template.php
63.328KB
Hapus
Edit
Rename
post-thumbnail-template.php
10.633KB
Hapus
Edit
Rename
post.php
268.666KB
Hapus
Edit
Rename
query.php
34.944KB
Hapus
Edit
Rename
registration-functions.php
0.195KB
Hapus
Edit
Rename
registration.php
0.195KB
Hapus
Edit
Rename
rest-api.php
93.053KB
Hapus
Edit
Rename
revision.php
22.933KB
Hapus
Edit
Rename
rewrite.php
18.763KB
Hapus
Edit
Rename
robots-template.php
5.052KB
Hapus
Edit
Rename
rss-functions.php
0.249KB
Hapus
Edit
Rename
rss.php
22.439KB
Hapus
Edit
Rename
script-loader.php
110.872KB
Hapus
Edit
Rename
session.php
0.252KB
Hapus
Edit
Rename
shortcodes.php
20.93KB
Hapus
Edit
Rename
sitemaps.php
3.162KB
Hapus
Edit
Rename
spl-autoload-compat.php
0.431KB
Hapus
Edit
Rename
taxonomy.php
167.623KB
Hapus
Edit
Rename
template-canvas.php
0.578KB
Hapus
Edit
Rename
template-loader.php
2.941KB
Hapus
Edit
Rename
template.php
21.958KB
Hapus
Edit
Rename
theme-i18n.json
0.903KB
Hapus
Edit
Rename
theme-templates.php
5.404KB
Hapus
Edit
Rename
theme.json
5.602KB
Hapus
Edit
Rename
theme.php
124.052KB
Hapus
Edit
Rename
update.php
29.338KB
Hapus
Edit
Rename
user.php
157.788KB
Hapus
Edit
Rename
vars.php
5.68KB
Hapus
Edit
Rename
version.php
0.937KB
Hapus
Edit
Rename
widgets.php
67.579KB
Hapus
Edit
Rename
wlwmanifest.xml
1.021KB
Hapus
Edit
Rename
wp-db.php
106.221KB
Hapus
Edit
Rename
wp-diff.php
0.632KB
Hapus
Edit
Rename
<?php /** * Taxonomy API: Core category-specific functionality * * @package WordPress * @subpackage Taxonomy */ /** * Retrieves a list of category objects. * * If you set the 'taxonomy' argument to 'link_category', the link categories * will be returned instead. * * @since 2.1.0 * * @see get_terms() Type of arguments that can be changed. * * @param string|array $args { * Optional. Arguments to retrieve categories. See get_terms() for additional options. * * @type string $taxonomy Taxonomy to retrieve terms for. Default 'category'. * } * @return array List of category objects. */ function get_categories( $args = '' ) { $defaults = array( 'taxonomy' => 'category' ); $args = wp_parse_args( $args, $defaults ); /** * Filters the taxonomy used to retrieve terms when calling get_categories(). * * @since 2.7.0 * * @param string $taxonomy Taxonomy to retrieve terms from. * @param array $args An array of arguments. See get_terms(). */ $args['taxonomy'] = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args ); // Back compat. if ( isset( $args['type'] ) && 'link' === $args['type'] ) { _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( /* translators: 1: "type => link", 2: "taxonomy => link_category" */ __( '%1$s is deprecated. Use %2$s instead.' ), '<code>type => link</code>', '<code>taxonomy => link_category</code>' ) ); $args['taxonomy'] = 'link_category'; } $categories = get_terms( $args ); if ( is_wp_error( $categories ) ) { $categories = array(); } else { $categories = (array) $categories; foreach ( array_keys( $categories ) as $k ) { _make_cat_compat( $categories[ $k ] ); } } return $categories; } /** * Retrieves category data given a category ID or category object. * * If you pass the $category parameter an object, which is assumed to be the * category row object retrieved the database. It will cache the category data. * * If you pass $category an integer of the category ID, then that category will * be retrieved from the database, if it isn't already cached, and pass it back. * * If you look at get_term(), then both types will be passed through several * filters and finally sanitized based on the $filter parameter value. * * @since 1.5.1 * * @param int|object $category Category ID or category row object. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional. How to sanitize category fields. Default 'raw'. * @return object|array|WP_Error|null Category data in type defined by $output parameter. * WP_Error if $category is empty, null if it does not exist. */ function get_category( $category, $output = OBJECT, $filter = 'raw' ) { $category = get_term( $category, 'category', $output, $filter ); if ( is_wp_error( $category ) ) { return $category; } _make_cat_compat( $category ); return $category; } /** * Retrieves a category based on URL containing the category slug. * * Breaks the $category_path parameter up to get the category slug. * * Tries to find the child path and will return it. If it doesn't find a * match, then it will return the first category matching slug, if $full_match, * is set to false. If it does not, then it will return null. * * It is also possible that it will return a WP_Error object on failure. Check * for it when using this function. * * @since 2.1.0 * * @param string $category_path URL containing category slugs. * @param bool $full_match Optional. Whether full path should be matched. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @return WP_Term|array|WP_Error|null Type is based on $output value. */ function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) { $category_path = rawurlencode( urldecode( $category_path ) ); $category_path = str_replace( '%2F', '/', $category_path ); $category_path = str_replace( '%20', ' ', $category_path ); $category_paths = '/' . trim( $category_path, '/' ); $leaf_path = sanitize_title( basename( $category_paths ) ); $category_paths = explode( '/', $category_paths ); $full_path = ''; foreach ( (array) $category_paths as $pathdir ) { $full_path .= ( '' !== $pathdir ? '/' : '' ) . sanitize_title( $pathdir ); } $categories = get_terms( array( 'taxonomy' => 'category', 'get' => 'all', 'slug' => $leaf_path, ) ); if ( empty( $categories ) ) { return; } foreach ( $categories as $category ) { $path = '/' . $leaf_path; $curcategory = $category; while ( ( 0 != $curcategory->parent ) && ( $curcategory->parent != $curcategory->term_id ) ) { $curcategory = get_term( $curcategory->parent, 'category' ); if ( is_wp_error( $curcategory ) ) { return $curcategory; } $path = '/' . $curcategory->slug . $path; } if ( $path == $full_path ) { $category = get_term( $category->term_id, 'category', $output ); _make_cat_compat( $category ); return $category; } } // If full matching is not required, return the first cat that matches the leaf. if ( ! $full_match ) { $category = get_term( reset( $categories )->term_id, 'category', $output ); _make_cat_compat( $category ); return $category; } } /** * Retrieves a category object by category slug. * * @since 2.3.0 * * @param string $slug The category slug. * @return object|false Category data object on success, false if not found. */ function get_category_by_slug( $slug ) { $category = get_term_by( 'slug', $slug, 'category' ); if ( $category ) { _make_cat_compat( $category ); } return $category; } /** * Retrieves the ID of a category from its name. * * @since 1.0.0 * * @param string $cat_name Category name. * @return int Category ID on success, 0 if the category doesn't exist. */ function get_cat_ID( $cat_name ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $cat = get_term_by( 'name', $cat_name, 'category' ); if ( $cat ) { return $cat->term_id; } return 0; } /** * Retrieves the name of a category from its ID. * * @since 1.0.0 * * @param int $cat_id Category ID. * @return string Category name, or an empty string if the category doesn't exist. */ function get_cat_name( $cat_id ) { $cat_id = (int) $cat_id; $category = get_term( $cat_id, 'category' ); if ( ! $category || is_wp_error( $category ) ) { return ''; } return $category->name; } /** * Checks if a category is an ancestor of another category. * * You can use either an ID or the category object for both parameters. * If you use an integer, the category will be retrieved. * * @since 2.1.0 * * @param int|object $cat1 ID or object to check if this is the parent category. * @param int|object $cat2 The child category. * @return bool Whether $cat2 is child of $cat1. */ function cat_is_ancestor_of( $cat1, $cat2 ) { return term_is_ancestor_of( $cat1, $cat2, 'category' ); } /** * Sanitizes category data based on context. * * @since 2.3.0 * * @param object|array $category Category data. * @param string $context Optional. Default 'display'. * @return object|array Same type as $category with sanitized data for safe use. */ function sanitize_category( $category, $context = 'display' ) { return sanitize_term( $category, 'category', $context ); } /** * Sanitizes data in single category key field. * * @since 2.3.0 * * @param string $field Category key to sanitize. * @param mixed $value Category value to sanitize. * @param int $cat_id Category ID. * @param string $context What filter to use, 'raw', 'display', etc. * @return mixed Same type as $value after $value has been sanitized. */ function sanitize_category_field( $field, $value, $cat_id, $context ) { return sanitize_term_field( $field, $value, $cat_id, 'category', $context ); } /* Tags */ /** * Retrieves all post tags. * * @since 2.3.0 * * @param string|array $args { * Optional. Arguments to retrieve tags. See get_terms() for additional options. * * @type string $taxonomy Taxonomy to retrieve terms for. Default 'post_tag'. * } * @return WP_Term[]|int|WP_Error Array of 'post_tag' term objects, a count thereof, * or WP_Error if any of the taxonomies do not exist. */ function get_tags( $args = '' ) { $defaults = array( 'taxonomy' => 'post_tag' ); $args = wp_parse_args( $args, $defaults ); $tags = get_terms( $args ); if ( empty( $tags ) ) { $tags = array(); } else { /** * Filters the array of term objects returned for the 'post_tag' taxonomy. * * @since 2.3.0 * * @param WP_Term[]|int|WP_Error $tags Array of 'post_tag' term objects, a count thereof, * or WP_Error if any of the taxonomies do not exist. * @param array $args An array of arguments. @see get_terms() */ $tags = apply_filters( 'get_tags', $tags, $args ); } return $tags; } /** * Retrieves a post tag by tag ID or tag object. * * If you pass the $tag parameter an object, which is assumed to be the tag row * object retrieved from the database, it will cache the tag data. * * If you pass $tag an integer of the tag ID, then that tag will be retrieved * from the database, if it isn't already cached, and passed back. * * If you look at get_term(), both types will be passed through several filters * and finally sanitized based on the $filter parameter value. * * @since 2.3.0 * * @param int|WP_Term|object $tag A tag ID or object. * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional. How to sanitize tag fields. Default 'raw'. * @return WP_Term|array|WP_Error|null Tag data in type defined by $output parameter. * WP_Error if $tag is empty, null if it does not exist. */ function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) { return get_term( $tag, 'post_tag', $output, $filter ); } /* Cache */ /** * Removes the category cache data based on ID. * * @since 2.1.0 * * @param int $id Category ID */ function clean_category_cache( $id ) { clean_term_cache( $id, 'category' ); } /** * Updates category structure to old pre-2.3 from new taxonomy structure. * * This function was added for the taxonomy support to update the new category * structure with the old category one. This will maintain compatibility with * plugins and themes which depend on the old key or property names. * * The parameter should only be passed a variable and not create the array or * object inline to the parameter. The reason for this is that parameter is * passed by reference and PHP will fail unless it has the variable. * * There is no return value, because everything is updated on the variable you * pass to it. This is one of the features with using pass by reference in PHP. * * @since 2.3.0 * @since 4.4.0 The `$category` parameter now also accepts a WP_Term object. * @access private * * @param array|object|WP_Term $category Category row object or array. */ function _make_cat_compat( &$category ) { if ( is_object( $category ) && ! is_wp_error( $category ) ) { $category->cat_ID = $category->term_id; $category->category_count = $category->count; $category->category_description = $category->description; $category->cat_name = $category->name; $category->category_nicename = $category->slug; $category->category_parent = $category->parent; } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) { $category['cat_ID'] = &$category['term_id']; $category['category_count'] = &$category['count']; $category['category_description'] = &$category['description']; $category['cat_name'] = &$category['name']; $category['category_nicename'] = &$category['slug']; $category['category_parent'] = &$category['parent']; } }