src/Controller.php
final private function __setDataFromPost()
    {
        // Only set data from $post to App class
        if ($this->template !== 'app') {
            return;
        }

        // Only continue if $post is available
        if (!is_singular()) {
            return;
        }

        // Set $this->post to allow users to use $this->post->post_title and others
        $this->post = get_post();

        // Set the post array to be included in $this->data
        $this->data['post'] = $this->post;
    }
final private function __setDataFromPost()
    {
        // Only set data from $post to App class
        if ($this->template !== 'app') {
            return;
        }

        // Only continue if $post is available
        if (!is_singular()) {
            return;
        }

        // Set $this->post to allow users to use $this->post->post_title and others
        $this->post = get_post();

        // Set the post array to be included in $this->data
        $this->data['post'] = $this->post;
    }
final private function __setDataFromPost ( ) { // Only set data from $post to App class if ( $ this -> template !== 'app' ) { return ; } // Only continue if $post is available if ( ! is_singular ( ) ) { return ; } // Set $this->post to allow users to use $this->post->post_title and others $ this -> post = get_post ( ) ; // Set the post array to be included in $this->data $ this -> data [ 'post' ] = $ this -> post ; }
Set Data From Post

Set the WordPress post
Set Data From Post