There are two direct actions that you can hook into while deleting a theme
do_action( 'delete_theme', $stylesheet );
And
do_action( 'deleted_theme', $stylesheet, $deleted );
Now about the error_log()
function, you seem to be missing a argument, the destination.
One of my debugging tool is a custom error_log function, this is its code.
error_log(print_r($some_value, true), 3, __DIR__ . '/log.txt');
error_log("\r\n\r\n", 3, __DIR__ . '/log.txt');
This will create a log.txt
file in the same folder where you called this functions. If you use this in functions.php
the log.txt
will be in the root of your theme.
Related Posts:
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- What is the difference between front-page.php and home.php? [duplicate]
- Custom Image section in Customizer
- Any alternate TinyMCE4 themes / subthemes?
- Strict Standards Error bootstrap navwalker
- wp_get_attachment_image_attributes not working for me
- Specify image dimensions
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- register_sidebar ignores ‘id’ and ‘class’
- add_editor_style not working
- Add colors to existing color palette without replacing it
- How to hide and content from auto-generated excerpts?
- How can I include a post in a theme?
- Custom CSS In Uploads Folder
- Default header image does not display
- How to write .htaccess dynamically? [closed]
- Adding wp_enqueue_media(); causes problem
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- What is the correct way to do a mobile theme for WordPress?
- What is the right way to make custom main page?
- .sub-menu or .children?
- Custom CSS without css.php file
- Is there a need for nonce with Post Metabox?
- Script only partially runs on theme activation, but runs fully on deactivation?
- How to echo category_description() without stripping out html tags?
- Understanding WordPress(framework?) Web Development
- For best DB performance should I serialize all theme options together or by type?
- Stylesheet not linking
- How to control layout of posts on page?
- saving row as a template using WPBakery Page Builder is not working [closed]
- Custom metabox for custom page template
- Display recent posts with thumbnail
- Custom Widget options in theme
- Primary navigation menu & footer not showing in category / tag page
- WordPress Website Browser Compatibility issue with IE [closed]
- create category on theme setup
- Exclude read more in the_excerpt [closed]
- Where am I doing wrong in my theme menu?
- Recommended method for updating/adding menus when adding new theme
- How to add custom meta box under Gallery Settings in the “Edit Gallery” popup
- Is it possible to make *.js and folders visible in theme-editor
- How do I turn a post thumbnail into a background image?
- Alternative to file_get_contents() for theme operations
- How to use add_theme_support(‘html5’)?
- Can I Set Up Session in WordPress Custom Page
- Updating a live theme safely?
- How do I remove inline style in featured image markup?
- How to list articles by year based on url?
- Change Responsive Images Maximum Width of 1600px
- Why is my CSS not loading?
- How to find default functions of wordpress
- How to remove ver from stylesheet URL? [duplicate]
- How to make theme configurable
- How can I hard code my sidebar?
- wp_nav_menu with default pages menu
- Theme customizer – can’t add section/settings
- StoreFront WordPress theme: How can i create a new Home page with Custom design same as template [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- using Options Framework – can “theme-textdomain” domain be changed?
- How to add sidebar to Isola theme? [closed]
- Custom theme template files
- How to get the theme index.php listed in appearance editor
- Filter to remove the default password on “Your Profile” page
- How to add testimonials with an image?
- How to setup sidebar modules to use jQuery Accordian
- Gallery functionality in custom theme
- WordPress Animation Adjustments
- theme directory fallback image outputs url and not the image
- How to Modify WP_Includes/blocks/latest_posts.php
- Adding popup support to the theme
- How do I change the color of individual page titles in WordPress?
- Page For Specific Posts
- How toprint informations in footer
- How to implement pagination in category.php template
- How to reduce the vertical space above and below a ul list uniformly with one command?
- How can I show a custom WordPress menu anywhere I want on my website?
- WordPress Menu item > Sub menu Class update
- How to know and change the machine name of a menu?
- How does mediaelement.js work in WordPress?
- Images use & location, on new wordpress theme
- On wordpress, how do i require specific dimensions from user uploads only
- WordPress Theme Developments – Start from another theme
- Access meta box checked value in another file
- Slider should be display in home template [closed]
- WordPress Customization API overwrite LESS variable
- Dynamic meta description
- How to Remove Sidebar when get_sidebar() is not get called in page?
- How does offset works on pagination? (get_results)
- Plugin or script to apply updated media settings to all featured images
- Header links also appearing in the footer
- Extending arrays in parent theme without completely overriding the files
- WordPress Subpages Fancybox Trouble
- Toolbox theme using printif statement – help needed understanding code block
- How to Create a Multi Purpose Theme?
- WordPress does not know the parametrs i sent to admin post
- customize functionality of share buttons under each blog post [closed]
- Is there any halfway decent documentation on the wp.media JS class?