From 03573ac141dace473efa1fe739848ec3b68069aa Mon Sep 17 00:00:00 2001 From: Nathan Schmidt <91974372+nathan-schmidt-viget@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:41:37 -0700 Subject: [PATCH] [#39] removing page for menu --- .../src/classes/Auctions/Auctions.php | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php b/client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php index 49409a8f4..f1e78938c 100644 --- a/client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php +++ b/client-mu-plugins/goodbids/src/classes/Auctions/Auctions.php @@ -60,9 +60,6 @@ public function __construct() { // Set the auction archive page in the main navigation $this->set_auction_archive_posts_per_page(); - // Adds the auction archive page to the pages - $this->add_auction_archive_page(); - // Sets a default image $this->set_default_feature_image(); } @@ -474,7 +471,7 @@ function ( int $post_id ) { private function set_auction_archive_posts_per_page(): void { add_action( 'pre_get_posts', - function ( $query ) { + function ( \WP_Query $query ): void { if ( ! is_admin() && is_post_type_archive( 'gb-auction' ) ) { $query->set( 'posts_per_page', 9 ); } @@ -482,30 +479,6 @@ function ( $query ) { ); } - /** - * Adds the Auction archive page the pages section - * - * @since 1.0.0 - * - * @return void - */ - private function add_auction_archive_page(): void { - add_action( - 'goodbids_init_site', - function () { - $page = array( - 'post_type' => 'page', - 'post_title' => __( 'Auctions', 'goodbids' ), - 'post_status' => 'publish', - 'post_author' => 1, - 'post_name' => self::ARCHIVE_SLUG, - ); - - wp_insert_post( $page ); - } - ); - } - /** * Set the default feature image for Auction