From beb4a18bf102ace78704adf090ff72535944e112 Mon Sep 17 00:00:00 2001 From: Paul Kevan Date: Wed, 18 Dec 2024 14:49:32 +0000 Subject: [PATCH] phpcs --- .../camptix/inc/class-camptix-admin.php | 68 ++++++++++++------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php index 28e97d42a..c80070905 100644 --- a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php +++ b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php @@ -42,17 +42,23 @@ public function admin_menu_fix() { // Make sure Coupons is selected when adding a new coupon. if ( 'post-new.php' == $pagenow && 'tix_coupon' == $typenow ) { - add_filter( 'submenu_file', function () { return 'edit.php?post_type=tix_coupon'; } ); + add_filter( 'submenu_file', function () { + return 'edit.php?post_type=tix_coupon'; + } ); } // Make sure Attendees is selected when adding a new attendee. if ( 'post-new.php' == $pagenow && 'tix_attendee' == $typenow ) { - add_filter( 'submenu_file', function () { return 'edit.php?post_type=tix_attendee'; } ); + add_filter( 'submenu_file', function () { + return 'edit.php?post_type=tix_attendee'; + } ); } // Make sure Tickets is selected when creating a new ticket. if ( 'post-new.php' == $pagenow && 'tix_ticket' == $typenow ) { - add_filter( 'submenu_file', function () { return 'edit.php?post_type=tix_ticket'; } ); + add_filter( 'submenu_file', function () { + return 'edit.php?post_type=tix_ticket'; + } ); } } @@ -62,7 +68,7 @@ public function admin_menu_fix() { public function menu_setup() { ?>
-

+

@@ -109,7 +115,7 @@ public function menu_setup_tabs() { public function menu_tools() { ?>
-

+

menu_tools_summarize(); } elseif ( 'revenue' == $section ) { $this->menu_tools_revenue(); - } elseif ( 'export' == $section ) { + } elseif ( 'export' == $section ) { $this->menu_tools_export(); - } elseif ( 'notify' == $section ) { + } elseif ( 'notify' == $section ) { $this->menu_tools_notify(); } elseif ( 'refund' == $section && ! $this->options['archived'] ) { $this->menu_tools_refund(); @@ -161,12 +167,14 @@ public function get_tools_section() { */ public function menu_tools_tabs() { $current_section = $this->get_tools_section(); - $sections = apply_filters( 'camptix_menu_tools_tabs', array( - 'summarize' => __( 'Summarize', 'wordcamporg' ), - 'revenue' => __( 'Revenue', 'wordcamporg' ), - 'export' => __( 'Export', 'wordcamporg' ), - 'notify' => __( 'Notify', 'wordcamporg' ), - ) ); + $sections = apply_filters( 'camptix_menu_tools_tabs', + array( + 'summarize' => __( 'Summarize', 'wordcamporg' ), + 'revenue' => __( 'Revenue', 'wordcamporg' ), + 'export' => __( 'Export', 'wordcamporg' ), + 'notify' => __( 'Notify', 'wordcamporg' ), + ) + ); if ( current_user_can( $this->caps['refund_all'] ) && ! $this->options['archived'] && $this->options['refund_all_enabled'] ) { $sections['refund'] = esc_html__( 'Refund', 'wordcamporg' ); @@ -184,6 +192,7 @@ public function menu_tools_tabs() { * provides an export option, powered by the summarize_admin_init method, * hooked (almost) at admin_init, because of additional headers. Doesn't use * the Settings API so check for nonces/referrers and caps. + * * @see summarize_admin_init() */ public function menu_tools_summarize() { @@ -193,15 +202,16 @@ public function menu_tools_summarize() { - +