mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Assume WP_DEBUG is defined in wpdb. Remove unnecessary constant() calls. Ensure DB_COLLATE defined as empty string doesn't override default Multisite collation. fixes #12041, see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@13209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4169,7 +4169,7 @@ function wp_save_post_revision( $post_id ) {
|
||||
return;
|
||||
|
||||
// WP_POST_REVISIONS = 0, false
|
||||
if ( !constant('WP_POST_REVISIONS') )
|
||||
if ( ! WP_POST_REVISIONS )
|
||||
return;
|
||||
|
||||
if ( !$post = get_post( $post_id, ARRAY_A ) )
|
||||
@@ -4448,7 +4448,7 @@ function wp_delete_post_revision( $revision_id ) {
|
||||
* @return array empty if no revisions
|
||||
*/
|
||||
function wp_get_post_revisions( $post_id = 0, $args = null ) {
|
||||
if ( !constant('WP_POST_REVISIONS') )
|
||||
if ( ! WP_POST_REVISIONS )
|
||||
return array();
|
||||
if ( ( !$post = get_post( $post_id ) ) || empty( $post->ID ) )
|
||||
return array();
|
||||
|
||||
Reference in New Issue
Block a user