#38533 closed enhancement (fixed)
Introduce a flag to indicate a "fresh site"
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Upgrade/Install | Keywords: | has-patch |
| Focuses: | Cc: |
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 (14)
#1
@swissspidy
8 weeks ago
#2
@ocean90
8 weeks 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
@westonruter
8 weeks 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.
8 weeks ago
#5
@westonruter
8 weeks ago
- Owner set to westonruter
- Resolution set to fixed
- Status changed from new to closed
In 38991:
This ticket was mentioned in Slack in #core-themes by helen. View the logs.
8 weeks ago
#7
@helen
8 weeks ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
Looks like this is getting populated as 1 on existing sites, I guess we should populate as 0 in that case.
@westonruter
8 weeks ago
#8
@westonruter
8 weeks 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.
#11
@westonruter
5 weeks ago
In 39276:
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.