#38533 closed enhancement (fixed)
Introduce a flag to indicate a "fresh site"
| Reported by: | helen | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Closely tied to starter content in #38114, but also potentially generally useful.
Thinking a flag (option) that is set on install and then deleted upon the first run of one of a number of actions. Those actions should be: adding/updating a post or page, changing widgets, or saving customizer settings.
Attachments (3)
Change History (15)
#2
@
10 years ago
- Keywords has-patch added
38533.1.diff sets the option to 0 so the option is autoloaded to prevent further db queries.
Not sure about the get_option() in default-filters though, looks like it's first one that runs so early. Currently it's wp_plugin_directory_constants() with get_option('siteurl') so I guess it's fine.
#3
@
10 years ago
Please review and make additional revs via pushing to feature branch on GitHub. See PR: https://github.com/xwp/wordpress-develop/pull/188
This ticket was mentioned in Slack in #core by westonruter. View the logs.
10 years ago
This ticket was mentioned in Slack in #core-themes by helen. View the logs.
10 years ago
#7
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed
- Status closed → reopened
Looks like this is getting populated as 1 on existing sites, I guess we should populate as 0 in that case.
#8
@
10 years ago
- Keywords has-patch added; needs-patch removed
OK, so populate_options() will populate the options defined when upgrading in addition to when installing. Maybe the fresh_site flag should be set in wp_install() instead. This would ensure it only gets added for new installs and only once.
See 38533.2.diff.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
It might make more sense to have different options for each action to target the user better. They could open the customizer and hit save, but still be a newbie in regard to saving posts and widgets.