Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu...
File: class-wp-taxonomy.php
// Non-publicly queryable taxonomies should not register query vars, except in the admin.
[500] Fix | Delete
if ( false !== $this->query_var && $wp ) {
[501] Fix | Delete
$wp->add_query_var( $this->query_var );
[502] Fix | Delete
}
[503] Fix | Delete
[504] Fix | Delete
if ( false !== $this->rewrite && ( is_admin() || get_option( 'permalink_structure' ) ) ) {
[505] Fix | Delete
if ( $this->hierarchical && $this->rewrite['hierarchical'] ) {
[506] Fix | Delete
$tag = '(.+?)';
[507] Fix | Delete
} else {
[508] Fix | Delete
$tag = '([^/]+)';
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
add_rewrite_tag( "%$this->name%", $tag, $this->query_var ? "{$this->query_var}=" : "taxonomy=$this->name&term=" );
[512] Fix | Delete
add_permastruct( $this->name, "{$this->rewrite['slug']}/%$this->name%", $this->rewrite );
[513] Fix | Delete
}
[514] Fix | Delete
}
[515] Fix | Delete
[516] Fix | Delete
/**
[517] Fix | Delete
* Removes any rewrite rules, permastructs, and rules for the taxonomy.
[518] Fix | Delete
*
[519] Fix | Delete
* @since 4.7.0
[520] Fix | Delete
*
[521] Fix | Delete
* @global WP $wp Current WordPress environment instance.
[522] Fix | Delete
*/
[523] Fix | Delete
public function remove_rewrite_rules() {
[524] Fix | Delete
/* @var WP $wp */
[525] Fix | Delete
global $wp;
[526] Fix | Delete
[527] Fix | Delete
// Remove query var.
[528] Fix | Delete
if ( false !== $this->query_var ) {
[529] Fix | Delete
$wp->remove_query_var( $this->query_var );
[530] Fix | Delete
}
[531] Fix | Delete
[532] Fix | Delete
// Remove rewrite tags and permastructs.
[533] Fix | Delete
if ( false !== $this->rewrite ) {
[534] Fix | Delete
remove_rewrite_tag( "%$this->name%" );
[535] Fix | Delete
remove_permastruct( $this->name );
[536] Fix | Delete
}
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
/**
[540] Fix | Delete
* Registers the ajax callback for the meta box.
[541] Fix | Delete
*
[542] Fix | Delete
* @since 4.7.0
[543] Fix | Delete
*/
[544] Fix | Delete
public function add_hooks() {
[545] Fix | Delete
add_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' );
[546] Fix | Delete
}
[547] Fix | Delete
[548] Fix | Delete
/**
[549] Fix | Delete
* Removes the ajax callback for the meta box.
[550] Fix | Delete
*
[551] Fix | Delete
* @since 4.7.0
[552] Fix | Delete
*/
[553] Fix | Delete
public function remove_hooks() {
[554] Fix | Delete
remove_filter( 'wp_ajax_add-' . $this->name, '_wp_ajax_add_hierarchical_term' );
[555] Fix | Delete
}
[556] Fix | Delete
[557] Fix | Delete
/**
[558] Fix | Delete
* Gets the REST API controller for this taxonomy.
[559] Fix | Delete
*
[560] Fix | Delete
* Will only instantiate the controller class once per request.
[561] Fix | Delete
*
[562] Fix | Delete
* @since 5.5.0
[563] Fix | Delete
*
[564] Fix | Delete
* @return WP_REST_Controller|null The controller instance, or null if the taxonomy
[565] Fix | Delete
* is set not to show in rest.
[566] Fix | Delete
*/
[567] Fix | Delete
public function get_rest_controller() {
[568] Fix | Delete
if ( ! $this->show_in_rest ) {
[569] Fix | Delete
return null;
[570] Fix | Delete
}
[571] Fix | Delete
[572] Fix | Delete
$class = $this->rest_controller_class ? $this->rest_controller_class : WP_REST_Terms_Controller::class;
[573] Fix | Delete
[574] Fix | Delete
if ( ! class_exists( $class ) ) {
[575] Fix | Delete
return null;
[576] Fix | Delete
}
[577] Fix | Delete
[578] Fix | Delete
if ( ! is_subclass_of( $class, WP_REST_Controller::class ) ) {
[579] Fix | Delete
return null;
[580] Fix | Delete
}
[581] Fix | Delete
[582] Fix | Delete
if ( ! $this->rest_controller ) {
[583] Fix | Delete
$this->rest_controller = new $class( $this->name );
[584] Fix | Delete
}
[585] Fix | Delete
[586] Fix | Delete
if ( ! ( $this->rest_controller instanceof $class ) ) {
[587] Fix | Delete
return null;
[588] Fix | Delete
}
[589] Fix | Delete
[590] Fix | Delete
return $this->rest_controller;
[591] Fix | Delete
}
[592] Fix | Delete
[593] Fix | Delete
/**
[594] Fix | Delete
* Returns the default labels for taxonomies.
[595] Fix | Delete
*
[596] Fix | Delete
* @since 6.0.0
[597] Fix | Delete
*
[598] Fix | Delete
* @return (string|null)[][] The default labels for taxonomies.
[599] Fix | Delete
*/
[600] Fix | Delete
public static function get_default_labels() {
[601] Fix | Delete
if ( ! empty( self::$default_labels ) ) {
[602] Fix | Delete
return self::$default_labels;
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
$name_field_description = __( 'The name is how it appears on your site.' );
[606] Fix | Delete
$slug_field_description = __( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' );
[607] Fix | Delete
$parent_field_description = __( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' );
[608] Fix | Delete
$desc_field_description = __( 'The description is not prominent by default; however, some themes may show it.' );
[609] Fix | Delete
[610] Fix | Delete
self::$default_labels = array(
[611] Fix | Delete
'name' => array( _x( 'Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ),
[612] Fix | Delete
'singular_name' => array( _x( 'Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ),
[613] Fix | Delete
'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ),
[614] Fix | Delete
'popular_items' => array( __( 'Popular Tags' ), null ),
[615] Fix | Delete
'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ),
[616] Fix | Delete
'parent_item' => array( null, __( 'Parent Category' ) ),
[617] Fix | Delete
'parent_item_colon' => array( null, __( 'Parent Category:' ) ),
[618] Fix | Delete
'name_field_description' => array( $name_field_description, $name_field_description ),
[619] Fix | Delete
'slug_field_description' => array( $slug_field_description, $slug_field_description ),
[620] Fix | Delete
'parent_field_description' => array( null, $parent_field_description ),
[621] Fix | Delete
'desc_field_description' => array( $desc_field_description, $desc_field_description ),
[622] Fix | Delete
'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ),
[623] Fix | Delete
'view_item' => array( __( 'View Tag' ), __( 'View Category' ) ),
[624] Fix | Delete
'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ),
[625] Fix | Delete
'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ),
[626] Fix | Delete
'new_item_name' => array( __( 'New Tag Name' ), __( 'New Category Name' ) ),
[627] Fix | Delete
'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ),
[628] Fix | Delete
'add_or_remove_items' => array( __( 'Add or remove tags' ), null ),
[629] Fix | Delete
'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
[630] Fix | Delete
'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
[631] Fix | Delete
'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
[632] Fix | Delete
'filter_by_item' => array( null, __( 'Filter by category' ) ),
[633] Fix | Delete
'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
[634] Fix | Delete
'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ),
[635] Fix | Delete
/* translators: Tab heading when selecting from the most used terms. */
[636] Fix | Delete
'most_used' => array( _x( 'Most Used', 'tags' ), _x( 'Most Used', 'categories' ) ),
[637] Fix | Delete
'back_to_items' => array( __( '← Go to Tags' ), __( '← Go to Categories' ) ),
[638] Fix | Delete
'item_link' => array(
[639] Fix | Delete
_x( 'Tag Link', 'navigation link block title' ),
[640] Fix | Delete
_x( 'Category Link', 'navigation link block title' ),
[641] Fix | Delete
),
[642] Fix | Delete
'item_link_description' => array(
[643] Fix | Delete
_x( 'A link to a tag.', 'navigation link block description' ),
[644] Fix | Delete
_x( 'A link to a category.', 'navigation link block description' ),
[645] Fix | Delete
),
[646] Fix | Delete
);
[647] Fix | Delete
[648] Fix | Delete
return self::$default_labels;
[649] Fix | Delete
}
[650] Fix | Delete
[651] Fix | Delete
/**
[652] Fix | Delete
* Resets the cache for the default labels.
[653] Fix | Delete
*
[654] Fix | Delete
* @since 6.0.0
[655] Fix | Delete
*/
[656] Fix | Delete
public static function reset_default_labels() {
[657] Fix | Delete
self::$default_labels = array();
[658] Fix | Delete
}
[659] Fix | Delete
}
[660] Fix | Delete
[661] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function