Changes between Initial Version and Version 1 of Ticket #22316, comment 205
- Timestamp:
- 09/19/2021 11:09:45 PM (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22316, comment 205
initial v1 2 2 922550637 3 3 }}} 4 [https://github.com/afragen afragen] commented on [https://github.com/WordPress/wordpress-develop/pull/1674 #issuecomment-922550637 PR #1674]:4 [https://github.com/afragen afragen] commented on [https://github.com/WordPress/wordpress-develop/pull/1674 PR1674]: 5 5 6 6 State of the [https://github.com/WordPress/wordpress-develop/pull/1674 PR1674] … … 16 16 Uses a configuration array and command to initialize. `slug` is used to target the plugin row to deactivate the ability to delete or deactivate installed activated dependencies and to designate the dot org download link. This PR uses a class instance so that multiple configuration sources may be properly used. 17 17 18 <img width="699" alt="screenshot_101" src="https://user-images.githubusercontent.com/1296790/133944455-ae17c09e-cef2-4d41-82eb-71b7783fa0de.png"> 18 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133944455-ae17c09e-cef2-4d41-82eb-71b7783fa0de.png)]] 19 19 20 20 21 This PR does not try to control plugin activation. Every plugin developer should be responsible and ensure that their plugin degrades gracefully if a required dependency is not present and active. This is the current state of core and I believe it is out of scope to address this particular aspect. This PR does not force anything. If the user does not wish to install or activate a dependency all they must do is dismiss the admin notice and it will not reappear for a specified period of time. … … 24 25 Dependent plugins may be in either other plugins, themes, or both. In this example `Hello Dolly` is a required plugin for both **Plugin Dependency Feature** and **TwentyNineteen**. 25 26 26 <img width="982" alt="screenshot_100" src="https://user-images.githubusercontent.com/1296790/133944560-4c6072cb-a4d8-455f-a78b-3eafba1add4b.png"> 27 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133944560-4c6072cb-a4d8-455f-a78b-3eafba1add4b.png)]] 27 28 28 29 Admin Notices designate what is requiring the dependency and a link to install or activate the dependency. If the same dependency is in a theme, that is listed as themes load first. … … 30 31 After the dependency is installed an admin notice to activate it will display. The dependent plugin will show itself as a **Required Plugin** and list what plugins or themes it is **Required by** 31 32 32 <img width="979" alt="screenshot_102" src="https://user-images.githubusercontent.com/1296790/133945075-cd6806e2-1996-4fcd-9bff-fd9541a4ef54.png"> 33 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133945075-cd6806e2-1996-4fcd-9bff-fd9541a4ef54.png)]] 33 34 34 35 If a dependency is not in dot org, though it can have an install link, it will result in a failure. 35 36 36 <img width="975" alt="screenshot_103" src="https://user-images.githubusercontent.com/1296790/133944682-de91bbc1-4137-4b07-80a9-4b6d2c8c310f.png"> 37 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133944682-de91bbc1-4137-4b07-80a9-4b6d2c8c310f.png)]] 37 38 38 39 All admin notices are dismissible. The default is for 14 days, but this can be modified by a filter for anywhere from 1 day to forever. All that must be done is click the dismiss button. Notice the WooCommerce notice is no longer present. … … 40 41 Once activated a dependent plugin cannot be deactivated or deleted until the dependent plugin or theme is deactivated. 41 42 42 <img width="982" alt="screenshot_104" src="https://user-images.githubusercontent.com/1296790/133944982-362fe800-9d0d-48fc-87a8-40586e415a51.png"> 43 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133944982-362fe800-9d0d-48fc-87a8-40586e415a51.png)]] 43 44 44 45 In this case the theme was changed and the plugin deactivated. 45 46 46 <img width="975" alt="screenshot_105" src="https://user-images.githubusercontent.com/1296790/133945028-d3360341-e106-4ca1-a24b-e68d48129cd9.png"> 47 [[Image(https://i0.wp.com/user-images.githubusercontent.com/1296790/133945028-d3360341-e106-4ca1-a24b-e68d48129cd9.png)]] 47 48 48 <img width="975" alt="screenshot_105" src="https://user-images.githubusercontent.com/1296790/133945020-522c7c4f-b4d6-42d8-bac3-49b4d83350dc.png">49 49 50 50 The additional benefit of this PR is that it includes code for time dismissible admin notices that may be used for admin notices outside of this scope.