#38533 closed enhancement (fixed)
Introduce a flag to indicate a "fresh site"
Reported by: | helen | Owned by: | westonruter |
---|---|---|---|
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 (15)
#2
@
8 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
@
8 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.
8 years ago
#5
@
8 years 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 years ago
#7
@
8 years 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.
#8
@
8 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.
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.