backward.php
3 weeks ago
get_taxonomies_by_object_type.php
3 weeks ago
pmxe_filter.php
3 weeks ago
pmxe_functions.php
3 weeks ago
pmxe_prepare_price.php
3 weeks ago
pmxe_render_xml_attributes.php
3 weeks ago
pmxe_render_xml_element.php
3 weeks ago
pmxe_render_xml_text.php
3 weeks ago
str_getcsv.php
3 weeks ago
wp_all_export_check_children_assign.php
3 weeks ago
wp_all_export_clear_xss.php
3 weeks ago
wp_all_export_comments_clauses.php
3 weeks ago
wp_all_export_generate_export_file.php
3 weeks ago
wp_all_export_get_cpt_name.php
3 weeks ago
wp_all_export_get_export_format.php
3 weeks ago
wp_all_export_is_compatible.php
3 weeks ago
wp_all_export_parse_field_name.php
3 weeks ago
wp_all_export_posts_join.php
3 weeks ago
wp_all_export_posts_where.php
3 weeks ago
wp_all_export_pre_user_query.php
3 weeks ago
wp_all_export_prepare_template_csv.php
3 weeks ago
wp_all_export_prepare_template_xml.php
3 weeks ago
wp_all_export_rand_char.php
3 weeks ago
wp_all_export_remove_colons.php
3 weeks ago
wp_all_export_remove_source.php
3 weeks ago
wp_all_export_reverse_rules_html.php
3 weeks ago
wp_all_export_rmdir.php
3 weeks ago
wp_all_export_secure_file.php
3 weeks ago
wp_all_export_terms_clauses.php
3 weeks ago
wp_all_export_url_title.php
3 weeks ago
wp_all_export_write_article.php
3 weeks ago
wp_redirect_or_javascript.php
3 weeks ago
wp_all_export_remove_source.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | // phpcs:ignoreFile WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound,WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound,WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- legitimate plugin prefixes (pmxe/PMXE/wpae/Wpae/wp_all_export/wpallexport/XmlExport/CdataStrategy/VariableProductTitle/Soflyy/GF_Export); Plugin Check does not honor phpcs.xml prefix declaration |
| 4 | defined( 'ABSPATH' ) || exit; |
| 5 | |
| 6 | if ( ! function_exists('wp_all_export_remove_source')){ |
| 7 | function wp_all_export_remove_source($file, $remove_dir = true){ |
| 8 | |
| 9 | wp_delete_file($file); |
| 10 | |
| 11 | $path_parts = pathinfo($file); |
| 12 | if ( ! empty($path_parts['dirname'])){ |
| 13 | $path_all_parts = explode('/', $path_parts['dirname']); |
| 14 | $dirname = array_pop($path_all_parts); |
| 15 | |
| 16 | if ( wp_all_export_isValidMd5($dirname)){ |
| 17 | if ($remove_dir){ |
| 18 | wp_delete_file($path_parts['dirname'] . DIRECTORY_SEPARATOR . 'index.php' ); |
| 19 | } |
| 20 | if ($remove_dir or count(@scandir($path_parts['dirname'])) == 2) |
| 21 | wp_all_export_rmdir($path_parts['dirname']); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | } |
| 26 | } |