Forum Replies Created

Viewing 1 replies (of 1 total)
  • It seems the status of the post will be set to future if its in the future & not to publish -so if its not published its not viewable (by non-logged in users)… or is it?

    I have edited query.php (starting at line 1083) to;

    if ( ('publish' != $status) ) {
    			 if ('future' == $status) {$this->is_preview = true;}else{
    				if ( ! is_user_logged_in() ) {
    					// User must be logged in to view unpublished posts.
    					$this->posts = array();
    				} else {
    					if ('draft' == $status) {
    						// User must have edit permissions on the draft to preview.
    						if (! current_user_can('edit_post', $this->posts[0]->ID)) {
    							$this->posts = array();
    						} else {
    							$this->is_preview = true;
    							$this->posts[0]->post_date = current_time('mysql');
    						}
    					}  else if ('future' == $status) {
    						$this->is_preview = true;
    						if (!current_user_can('edit_post', $this->posts[0]->ID)) {
    							$this->posts = array ( );
    						}
    					} else {
    						if (! current_user_can('read_post', $this->posts[0]->ID))
    							$this->posts = array();
    					}
    				}
    				}
    			}

    Future posts are now viewable by all when published and not by date

    Hope this helps

Viewing 1 replies (of 1 total)