Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Elementor\App\Modules\ImportExport\Runners\Revert; class Taxonomies exte..
Decoded Output download
<?php
namespace Elementor\App\Modules\ImportExport\Runners\Revert;
class Taxonomies extends Revert_Runner_Base {
public static function get_name() : string {
return 'taxonomies';
}
public function should_revert( array $data ) : bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
);
}
public function revert( array $data ) {
$taxonomies = get_taxonomies();
$terms = get_terms( [
'taxonomy' => $taxonomies,
'hide_empty' => false,
'get' => 'all',
'meta_query' => [
[
'key' => static::META_KEY_ELEMENTOR_IMPORT_SESSION_ID,
'value' => $data['session_id'],
],
],
] );
foreach ( $terms as $term ) {
wp_delete_term( $term->term_id, $term->taxonomy );
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Elementor\App\Modules\ImportExport\Runners\Revert;
class Taxonomies extends Revert_Runner_Base {
public static function get_name() : string {
return 'taxonomies';
}
public function should_revert( array $data ) : bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
);
}
public function revert( array $data ) {
$taxonomies = get_taxonomies();
$terms = get_terms( [
'taxonomy' => $taxonomies,
'hide_empty' => false,
'get' => 'all',
'meta_query' => [
[
'key' => static::META_KEY_ELEMENTOR_IMPORT_SESSION_ID,
'value' => $data['session_id'],
],
],
] );
foreach ( $terms as $term ) {
wp_delete_term( $term->term_id, $term->taxonomy );
}
}
}
Function Calls
None |
Stats
MD5 | 6426ba078342ae352705c6d2f6783f86 |
Eval Count | 0 |
Decode Time | 93 ms |