• Resolved szaqal21

    (@szaqal21)


    What does this condition:

    if ( ! WP_POST_REVISIONS )
    		return array();

    do at line 5016 in wp-includes\post.php?

    When WP_POST_REVISIONS is set to 0 autosave revision is not displayed in post/page revisions list in admin panel?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    When post revisions are set to 0 there are no revisions saved. So … yeah, the display is gone.

    Thread Starter szaqal21

    (@szaqal21)

    Not exactly, when revisions are set to 0, autosave revision is being saved. But this condition:

    if ( ! WP_POST_REVISIONS )
    		return array();

    doesn’t allow it to be displayed in the Revisions panel. So you can’t restore to autosave revision in the admin panel because it isn’t visible. So what’s the point of this condition?

    For me it doesn’t do the right job.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Autosave != revision save ??

    Thread Starter szaqal21

    (@szaqal21)

    ok, I get the point now.

    Thanks for reply

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Weird condition ( if ( ! WP_POST_REVISIONS ) line 5016) in post.php’ is closed to new replies.