Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/elementor/app/modules/import-export/runners/revert/ |
Upload File : |
<?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 ); } } }