I try this code and it solve my problem
if ( is_child_theme() === false ) {
// files moved
} else {
// do nothing
}
Thankx to @birgire
Related Posts:
- How to make “upgrade safe” theme for a plugin?
- Looking for WordPress System Diagrams
- How can I load a page template from a plugin?
- Overwrite theme file from plugin
- How to control output of custom post type without modifying theme?
- When is it appropriate to put functions on page template vs. functions.php?
- Filter to change the content of 404 page
- How to properly use a hook to create template for custom product type in a plugin such as Woocommerce? [closed]
- Use theme constants in plugin?
- WordPress removing data attributes for scheduled post
- Is there a way to loop through a shortcode datasource to create a table?
- Which action is triggered when a theme was modified?
- creating custom archive template within plugin for custom post type using archive_template filter
- Where to call wp_enqueue_script in a plugin with custom template?
- Can I change header.php of current theme through a plugin function?
- Can Page Templates be Applied to Archive and Post Templates?
- ORDER BY wp_post custom column name in wp_query
- Create a free scripts and styles template within a plugin
- How can I turn a custom wordpress page into a product page?
- How to preserve changes in templates and other files
- Plugin templates vs Parent Theme
- How to modify files inside wp-includes directory in wordpress
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Update Data parameter of a wp_localize_script() call
- How to create templates for a custom module to show on the front end within my theme?
- Why aren’t some plugin styles loading when I load a template?
- Plugin custom post template; without overriding all posts
- Best way to distribute templates and code accross multiple wordpress sites?
- Load php file with jquery in single.php
- Parent/Child themes – both CSS files loaded
- Want to know how to reveal a WordPress theme, considering the theme name is hidden?
- Overriding the template files using a plugin for all themes
- How do I use a plugin to swap out the template file for a custom post type?
- How can I make custom page templates work on child theme?
- Javascript not being loaded only in custom taxonomy template
- Add new header/footer on landing page with plugin
- Use a page as a template for a custom post type
- What is the “best” way to update a theme via a plugin?
- Page template compatibility with different themes
- How to set custom homepage via a plugin
- Template file structure , wordpress hook for altering the template
- Displaying External Data – Not Posts
- Making plugin output customizable
- Use different archive template for plugin
- How to display custom taxonomy and terms using/creating plugin template
- How to check during “pre_get_posts” if WP performing default query for specific custom template?
- WP Job Manager – Show recent jobs as cards
- Help interpreting @wordpress/create-block-tutorial-template usage error
- How to create an API for my plugin?
- Plugins in symlinked directories?
- Get parent theme version
- Elementor Fatal error: Class ‘Elementor\Widget_Base’ not found
- Unable to write test cases for a WordPress plugin using PHPUnit and WP-CLI
- How to use is_multisite() in a must-use-plugin?
- why creating tables using $wpdb is not being executed while installing plugins?
- How to update the language used by wordpress from a plugin
- Can I leave out `if ( ! defined …)` when defining plugin constants?
- WordPress Ajax callback function from plugin – OOP
- Is there any way to have Featured Text, as opposed to Featured Image?
- Can I use namespaces in my plugin?
- Access first name and last name from user_register
- Woocommerce custom emails without header and footer
- Custom attribute type not displaying terms in edit product – WooCommerce
- How do I add a prefix when a user registers
- Check and load class of theme from a plugin
- Short code not working in boostrap modal dont no why?
- Doubts about the use of metadata and how this can affect performance on WordPress
- How can I replace content in the WP Admin area before an admin page is rendered?
- update_post_meta not working in a loop
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- update your existing plugin’s WordPress compatibility
- How dynamic action login_form_{action} is working
- Cannot get jQuery UI to enqueue in my plugin!
- Can I use %category% like Templates in my Plugin?
- How to get the url of logo image?
- Plugin path comes wrongly
- Converting core modification to a plugin
- How to replace settings in WordPress plugin from a theme
- How can the_excerpt (or equivalent) be called on a category description?
- Plugin Creation: Overriding upload_max_size and post_max_size
- Problems with wierd characters and my plugin
- How to call a function from a shortcode function in an oop plugin
- How to access index file in Block Themes?
- wp_new_user_notifications to notify user and admin about new user registration
- Is it possible to use the MySQL’s ORDER BY FIELD() clause as part of the pre_get_posts hook?
- How to create a custom WordPress page with my plugin?
- Why User_login key doesn’t work with wp_update_user()
- How to limit number of category term display in home page grids?
- Shortcode content is not showing. Only the [shortcode-tag] is showing
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- Is it possible to replace MySQL with JSON files for WordPress
- Replace “content-area” of themes 404 page with plugin?
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- Create Customization panel for Plugins not for theme
- How is construct function working even when variable is assigned null value?
- Custom signature appears twice on page
- Declaring a new woo commerce product type i get this error
- List Available Templates for Current Theme in a Plugin
- WooCommerce custom payment gateway
- multiple record insert creating many duplicate records