| @@ -9,11 +9,8 @@ | ||
| 9 | 9 | declare(strict_types=1); |
| 10 | 10 | |
| 11 | 11 | namespace Parsely\Metadata; |
| 12 | 12 | |
| 13 | -use Parsely\Parsely; | |
| 14 | -use WP_Post; | |
| 15 | - | |
| 16 | 13 | /** |
| 17 | 14 | * Implements abstract Metadata Builder class to generate the metadata array |
| 18 | 15 | * for a front page. |
| 19 | 16 | * |
| @@ -20,30 +17,8 @@ | ||
| 20 | 17 | * @since 3.4.0 |
| 21 | 18 | */ |
| 22 | 19 | class Front_Page_Builder extends Metadata_Builder { |
| 23 | 20 | /** |
| 24 | - * Post object to generate the metadata for. | |
| 25 | - * | |
| 26 | - * @since 3.20.7 | |
| 27 | - * | |
| 28 | - * @var WP_Post | |
| 29 | - */ | |
| 30 | - private $post; | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * Constructor. | |
| 34 | - * | |
| 35 | - * @since 3.20.7 | |
| 36 | - * | |
| 37 | - * @param Parsely $parsely Instance of Parsely class. | |
| 38 | - * @param WP_Post $post Post object to generate the metadata for. | |
| 39 | - */ | |
| 40 | - public function __construct( Parsely $parsely, WP_Post $post ) { | |
| 41 | - parent::__construct( $parsely ); | |
| 42 | - $this->post = $post; | |
| 43 | - } | |
| 44 | - | |
| 45 | - /** | |
| 46 | 21 | * Generates the metadata object by calling the build_* methods and |
| 47 | 22 | * returns the value. |
| 48 | 23 | * |
| 49 | 24 | * @since 3.4.0 |
| @@ -53,19 +28,8 @@ | ||
| 53 | 28 | public function get_metadata(): array { |
| 54 | 29 | $this->build_basic(); |
| 55 | 30 | $this->build_headline(); |
| 56 | 31 | $this->build_url(); |
| 57 | - | |
| 58 | - if ( true === $this->parsely->get_options()['full_metadata_in_non_posts'] ) { | |
| 59 | - $this->build_main_entity( 'non-post' ); | |
| 60 | - $this->build_thumbnail_url( $this->post ); | |
| 61 | - $this->build_image( $this->post ); | |
| 62 | - $this->build_article_section( $this->post ); | |
| 63 | - $this->build_author( $this->post ); | |
| 64 | - $this->build_publisher(); | |
| 65 | - $this->build_keywords( $this->post ); | |
| 66 | - $this->build_metadata_post_times( $this->post ); | |
| 67 | - } | |
| 68 | 32 | |
| 69 | 33 | return $this->metadata; |
| 70 | 34 | } |
| 71 | 35 | |