-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UI to select an offline page #28
Commits on Jul 11, 2018
-
Begin UI to select an offline page.
Mainly taken from the privacy policy page UI in wp-admin/privacy.php. Some items remain, including adding the custom post status, and adding the href value.
Configuration menu - View commit details
-
Copy full SHA for 314c472 - Browse repository at this point
Copy the full SHA 314c472View commit details -
Configuration menu - View commit details
-
Copy full SHA for 596e44c - Browse repository at this point
Copy the full SHA 596e44cView commit details
Commits on Jul 12, 2018
-
Change option name to
page_for_offline
.New option name is consistent with the naming structure for static special pages.
Configuration menu - View commit details
-
Copy full SHA for 225ba95 - Browse repository at this point
Copy the full SHA 225ba95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53f6533 - Browse repository at this point
Copy the full SHA 53f6533View commit details -
Made settings errors appear on loading the Reading page.
Refactored to move the `add_settings_error` code to a separate method. Hooked that method to `admin_notices` action. Now settings errors appear both when saving and upon first loading the Reading page. Modified the "in the trash" error to link a link to the Page's Trash UI.
Configuration menu - View commit details
-
Copy full SHA for 8d7aa1c - Browse repository at this point
Copy the full SHA 8d7aa1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d7da59 - Browse repository at this point
Copy the full SHA 7d7da59View commit details
Commits on Jul 13, 2018
-
Remove page attributes support for Offline Page.
This new strategy works for both the classic and Gutenberg editors.
Configuration menu - View commit details
-
Copy full SHA for c683eaf - Browse repository at this point
Copy the full SHA c683eafView commit details -
Optimize the admin initialization by registering one callback.
Instead of registering multiple callbacks to the `admin_init`, this commit registers `init_admin()`. Then the new callback method handles the order of calling each of the tasks. This commit is more performant by O(n-1): 1. Decreases the processing time to do `add_action` as it only have to invoke it once. 2. Decreases the processing time when `do_action` as it only has to invoke one callback. It's more readable, as we can quickly read that the callback intent is to initialize the admin.
Configuration menu - View commit details
-
Copy full SHA for e76b7f1 - Browse repository at this point
Copy the full SHA e76b7f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83c5604 - Browse repository at this point
Copy the full SHA 83c5604View commit details -
Exclude static pages from dropdowns.
This comment handles excluding special static pages ( i.e. `page_on_front`, `page_for_posts`, and `wp_page_for_privacy_policy`, and `page_for_offline` ) from `wp_dropdown_pages`: 1. When selected, the offline page is excluded from the other dropdowns, preventing it from being selected as anything else but the offline page. 2. The homepage, posts page, and privacy page are all excluded from the Offline Page's dropdown. This commit also includes slight performance improvements by: 1. Initializing static pages on init. 2. Caching the offline page ID within the object itself, while also providing for a hard request (i.e. when true, run `get_option`).
Configuration menu - View commit details
-
Copy full SHA for 98c6f82 - Browse repository at this point
Copy the full SHA 98c6f82View commit details -
Add create new page functionality.
Using the Privacy code, this commit adds the HTML and create new page functionality. A unique action is added to the Reading URL. Upon clicking the "create new page" link, the new functionality inserts a new page and assigns it as the Offline Page.
Configuration menu - View commit details
-
Copy full SHA for 7e6574b - Browse repository at this point
Copy the full SHA 7e6574bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c403da5 - Browse repository at this point
Copy the full SHA c403da5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a7a720 - Browse repository at this point
Copy the full SHA 6a7a720View commit details
Commits on Jul 16, 2018
-
To be consistent with the other special pages (homepage, posts page, and privacy), this commit re-enables the page attributes.
Configuration menu - View commit details
-
Copy full SHA for cc997ef - Browse repository at this point
Copy the full SHA cc997efView commit details -
Excluding offline page from menus and search.
This commit excludes the offline page from all search and the menu builders including Appearance > Menus and Customizer's Menus.
Configuration menu - View commit details
-
Copy full SHA for 33c461c - Browse repository at this point
Copy the full SHA 33c461cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7c96b4 - Browse repository at this point
Copy the full SHA c7c96b4View commit details -
Exclude offline page from rendering on frontend.
This commit excludes the offline page from rendering on the frontend. A 404 is served up. When using plain permalinks, e.g. https://example.com?page_id=28, it will find and render the offline page. This is an incompletion strategy per conversations in Issue #23 @see #23 (comment).
Configuration menu - View commit details
-
Copy full SHA for c48b36c - Browse repository at this point
Copy the full SHA c48b36cView commit details
Commits on Jul 17, 2018
-
Split tasks into separate classes.
Grouped the tasks and split into separate classes, as the previous class design was doing too much.
Configuration menu - View commit details
-
Copy full SHA for 05b655b - Browse repository at this point
Copy the full SHA 05b655bView commit details -
Improve and optimize excluder.
This commit improves the excluder by: 1. Using parse_query. 2. Using $query->is_admin. 3. Checking for the offline page's query first. If yes, setting a 404 on the frontend.
Configuration menu - View commit details
-
Copy full SHA for 7104c53 - Browse repository at this point
Copy the full SHA 7104c53View commit details
Commits on Jul 26, 2018
-
Configuration menu - View commit details
-
Copy full SHA for cc40e00 - Browse repository at this point
Copy the full SHA cc40e00View commit details -
Include privacy page in
get_static_pages()
.We want to include all special pages, as we use this collection to remove these special pages from the page select dropdowns.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 846ce07 - Browse repository at this point
Copy the full SHA 846ce07View commit details -
Improve tests to ensure privacy page is also excluded from the offlin…
…e page dropdown and that the offline page is included and selected.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 11b49fc - Browse repository at this point
Copy the full SHA 11b49fcView commit details -
Change settings label to "Default offline status page".
This change was requested by Alberto. He's right as the previous label could be confusing as more than one page can be served in offline. But this specific page is the default offline status page when the one requested is not available.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 40f8737 - Browse repository at this point
Copy the full SHA 40f8737View commit details -
Publish status only in the page dropdowns and for creating a new page.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 7ef0dea - Browse repository at this point
Copy the full SHA 7ef0deaView commit details -
Merge the offline page ID with the current "post__not_in" var.
Being mindful of performance, this commit checks if the "post__not_in" has a value. If yes, then it merges with the offline page ID and then filters for only the unique values. Else, it sets the offline ID only, thereby skipping the `array_merge` and `array_unique`. The code is more complex. But it serves to only run the the array functions when needed.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for eddeb84 - Browse repository at this point
Copy the full SHA eddeb84View commit details -
Offline page is a page and singular.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for d1dbaf9 - Browse repository at this point
Copy the full SHA d1dbaf9View commit details -
Improve is_offline_page_query().
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for f8c3137 - Browse repository at this point
Copy the full SHA f8c3137View commit details -
Allow the default offline page to load on the frontend.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for ab4cbc6 - Browse repository at this point
Copy the full SHA ab4cbc6View commit details -
Make naming more clear by adding "default".
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 03e78ba - Browse repository at this point
Copy the full SHA 03e78baView commit details -
Exclude the default offline page from robots.
Tonya Mork committedJul 26, 2018 Configuration menu - View commit details
-
Copy full SHA for 9669026 - Browse repository at this point
Copy the full SHA 9669026View commit details
Commits on Jul 27, 2018
-
Separate concerns for no robots. Code formatting.
Tonya Mork committedJul 27, 2018 Configuration menu - View commit details
-
Copy full SHA for af9aedd - Browse repository at this point
Copy the full SHA af9aeddView commit details