-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Notice in Site Health in case revisions are disabled #7481
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
base: trunk
Are you sure you want to change the base?
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| 'label' => __( 'Post Revisions' ), | ||
| 'status' => $revisions_disabled ? 'recommended' : 'good', | ||
| 'badge' => array( | ||
| 'label' => __( 'Content Management' ), | ||
| 'color' => $revisions_disabled ? 'red' : 'green', | ||
| ), | ||
| 'description' => $revisions_disabled | ||
| ? __( 'Post revisions are currently disabled on your site. It is recommended to enable them to track changes and recover previous versions of your content.' ) | ||
| : __( 'Post revisions are enabled on your site. This helps with version control and content management.' ), | ||
| 'actions' => $revisions_disabled | ||
| ? sprintf( | ||
| '<p><a href="%s" target="_blank">%s</a></p>', | ||
| esc_url( 'https://wordpress.org/support/article/revisions/' ), | ||
| __( 'Learn more about enabling post revisions in WordPress.' ) | ||
| ) | ||
| : '', | ||
| 'test' => 'revisions_status', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation of the => on first level look wrong to me (WPCS issue)
| ), | ||
| 'description' => $revisions_disabled | ||
| ? __( 'Post revisions are currently disabled on your site. It is recommended to enable them to track changes and recover previous versions of your content.' ) | ||
| : __( 'Post revisions are enabled on your site. This helps with version control and content management.' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually show the revision count here as well.
Knowing that there are plugins out in the wild, that provide different review counts for different Post types, I think it would be reasonable to either try to show this automatically, or at least provide a filter and encourage the use of this for plugin authors.
| } | ||
|
|
||
| /** | ||
| * Tests if the revision is on/off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Tests if the revision is on/off. | |
| * Tests if revisions are enabled. |
| * | ||
| * @since 6.7.0 | ||
| * | ||
| * @return array The revision results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @return array The revision results. | |
| * @return array The test results. |
To be in sync with other functions.
I've added a notice in Site Health if the revision is disabled.
If the revision is disabled
If the revision is enabled
Trac ticket: (https://core.trac.wordpress.org/ticket/62119)