My educated guess is that process is implemented in Theme_Upgrader class.
It does some stuff with upgrader_post_install
hook (seems like a good candidate) and it does run switch_theme()
under some conditions (that I am too lazy to make sense of at moment).
Related Posts:
- get_template_part vs action hooks in themes
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Getting instance variable in scope of ‘wp_enqueue_scripts’
- What is a good way to pass a variable from add_action to a Theme?
- How to access certain WP functions inside custom class, in theme folder
- Theme elements not translating
- What’s the best action to use when you want to do something only once per theme setup?
- How to write .htaccess dynamically? [closed]
- Use debugging for add action events
- after_setup_theme, Global Variable and Theme Customizer
- Is there an action for save_menu and/or update_menu?
- How to make content editable from admin page?
- WordPress taxonomy and archive custom class
- Replace function in a child theme
- save_post action doesn’t passing post id to my function as argument
- Overide enqueue in non plugable function via child theme
- Never actually adding the action? Or do I have to call the action?
- Add content after get_header
- How to make a function occurs for one time?
- Suppress the_content filter in a nested loop
- add_action not working in header?
- Is there a way to prevent wp_head from outputting self-closing tags?
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- Theme’s featured image option is not showing up
- Add text when displying attribute with a hook on single product page
- Why is wp_head() creating a top margin at the top of my theme header?
- How to limit wordpress menu depth in admin panel
- How can I set image sizes and still have responsive images using the srcset attribute?
- Possible to “Attach” images to multiple posts without inserting or uploading twice?
- Trigger Customizer saving process with Javascript only
- Remove settings if theme is deleted?
- Adding customizer styles with wp_add_inline_style
- Adding widgets programatically: how to avoid collisions?
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- How do I get a parent theme modification from a child theme?
- Removing the default sidebar from admin panel
- Extend walker – navigation, adding data attribute to a tag
- How to display category specific post content on a page
- Is there any need to use both wp_reset_postdata and wp_reset_query together?
- how to pull wordpress post comments to a external page
- Enqueued Stylesheets Effecting Admin Styles
- Why is $GLOBALS[‘content_width’] needed if site is responsive?
- How i can get widgets areas working in customizer?
- current-menu-item class not working
- Correctly using wp_head()
- Theme development question regarding layouts
- Cannot figure out how to overwrite files in child theme
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- Link to a .po file in a child theme
- My Admin bar covers my sticky navbar [closed]
- Responsive embed for the video shortcode
- Access theme options in templates
- How to show post from category select
- How to append to menu items selectively
- Font Awesome 5 Free – far working but fas is not? [closed]
- How to remove header image in Twenty Eleven theme?
- How to create a fixed header and scrolling content area
- Have the homepage look different to index.php without a static page
- is_home and is_frontpage always true
- WordPress linking
- wp.media issue with selected image
- Why does admin-ajax load slow and what are ways to speed it up?
- How to style bootstrap container in wordpress theme?
- Wamp Server error on running wordpress theme on localhost. How do I fix this error? [closed]
- Shortcodes do not work in own template
- Adding Bootstrap to WordPress TwentySixteen Theme
- What are the allowable Tags values in a theme file header?
- $_POSTing to and modifying the WP search results page
- Confused by the behaviour of “front page” / “home” templates
- Following/tracing page construction through theme PHP
- How to Grab first Image from some Chosen Categories
- Get themes’s images path in WordPress Multisite
- altering search terms
- Creating a theme update notification api [duplicate]
- Custom menu: Link names
- Inconsistent bloginfo information
- get_the_terms() returning wrong results inside of loop
- Category-specific loop not working
- How to diagnose wp-env environment problem
- When I save changes for css and js in my WP localhost env windows 10 the changes don’t take effects immediately!
- Updatable theme developing
- SIte logo is not displaying
- makeing a terms of use page that is part of the theme
- How to make menus, footer, sidebars multi language
- Unable to delete option
- overlay post title over post’s featured image
- Child theme in separate WordPress Install
- Display problems in admin dashboard when creating a new theme from scratch
- Hook in parent theme Menu function
- How to add custom nav_menu_css_class to certain menu only?
- How to avoid Ajax in wordpress theme in making mulitple request?
- Import from HubSpot COS into WordPress 4?
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- Simple loop with shortcode rendering problem
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- Pagination adds product to cart Woo-Commerce
- Onepage with shortcodes
- Allowed memory size of (…) exhausted
- Twenty sixteen – full height