From a8e98ce7d962e26a9ced3325c0b01258646a3a2e Mon Sep 17 00:00:00 2001 From: kermage Date: Wed, 17 Apr 2024 08:37:38 +0800 Subject: [PATCH] stop handling attachments --- .gitignore | 1 + includes/Archive.php | 4 ++++ includes/Expire.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index a3abb17..279507b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store /.idea/ /bin/ /tests/ diff --git a/includes/Archive.php b/includes/Archive.php index efe66ba..b8fad26 100644 --- a/includes/Archive.php +++ b/includes/Archive.php @@ -227,6 +227,10 @@ public function reserve_slug( $is_bad, $slug, $post_type, $post_parent = null ) public function meta_box( $post_type ) { + if ( 'attachment' === $post_type ) { + return; + } + add_meta_box( 'at_archive_select', __( 'Status', 'augment-types' ), diff --git a/includes/Expire.php b/includes/Expire.php index 31635f9..fda8361 100644 --- a/includes/Expire.php +++ b/includes/Expire.php @@ -41,6 +41,10 @@ private function __construct() { public function meta_box( $post_type ) { + if ( 'attachment' === $post_type ) { + return; + } + add_meta_box( 'at_expire_settings', __( 'Expiration', 'augment-types' ),