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
- ‘global’ not working when passing variable from plugin file to template
- get_template_parts() usage
- Package a custom post type, and taxonomies, with their block templates in a plugin
- How to *remove* a parent theme page template from a child theme?
- Best practices for using the transients API
- Get parent theme version
- Elementor Fatal error: Class ‘Elementor\Widget_Base’ not found
- How Can I Add a Filter to Class Instance Only?
- Headers already sent error with CSV export plugin
- How to add HTML / Form to an Admin Bar Menu
- Call activation hook multiple times
- Adding custom code into header.php using a plugin
- Two-step login process – Is it possible?
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- Woocommerce how to update variable product price programitically?
- Can I use namespaces in my plugin?
- Will cron job run if page loaded is being served from cache?
- Sharing common functionality (functions, template parts) between plugins and themes?
- Access first name and last name from user_register
- Woocommerce custom emails without header and footer
- Check and load class of theme from a plugin
- What is the proper way to include Bootstrap when executing a shortcode
- wp_get_theme Warning: Illegal offset type
- wordpress is adding a second backslash when I use addslashes
- Silently register plugin pages
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- How do I remove folder and contents I have created while installing plugin
- Menu page with minimum capability as ‘Subscriber’ doesn’t allow ‘Admin’ to access it?
- I have this error notice ‘wp_enqueue_script was called incorrectly’ in my plugin
- Pass CF7 form data to plugin
- WP Dropdown Categories, display subcategories but not grandchildren categories?
- wpdb->get_var always returning 0
- How can I change my assigned user role in WordPress 3.5.1?
- Questions about meta box: nonce and parameters available
- Using WordPress with WP Statistics for QR code usage survey
- Add default value from selection
- How to Login a User inside a Plugin and Redirect to page?
- Gutenberg component in a plugin admin
- WP Query date_query with several date range
- get_permalink() of page the enclosing page not posts
- Add a new tag based on the category name in the publish event
- WordPress function is not called and ajax return 0
- Caption Shortcode: what filter to change the image size?
- How to search on the field that stores escaped strings?
- Adding Meta box to thrid-party plugin
- Identifying a Page Containing Shortcode at `init`
- Method not receiving attributes from shortcode call, general OOP problems
- Custom Nav Walker $item->url producing malformed hyperlinks
- WordPress database error: [Table ‘bitnami_wordpress.questions’ doesn’t exist]
- Shortcode to return data instead of outputting HTML?
- how to execute a function only when i send an order to trash [closed]