PUM_Admin_Tools::page()
Render settings page with tabs.
Description Description
Source Source
File: classes/Admin/Tools.php
public static function page() { $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], self::tabs() ) ? $_GET['tab'] : 'system_info'; wp_enqueue_style( 'pum-admin-general' ); ?> <div class="wrap"> <form id="pum-tools" method="post" action=""> <?php wp_nonce_field( basename( __FILE__ ), 'pum_tools_nonce' ); ?> <button class="right top button-primary"><?php esc_html_e( 'Save', 'popup-maker' ); ?></button> <h1><?php esc_html_e( 'Popup Maker Tools', 'popup-maker' ); ?></h1> <h2 id="popmake-tabs" class="nav-tab-wrapper"> <?php foreach ( self::tabs() as $tab_id => $tab_name ) { $tab_url = add_query_arg( array( 'tools-updated' => false, 'tab' => $tab_id, ) ); printf( '<a href="%s" title="%s" class="nav-tab %s">%s</a>', esc_url( $tab_url ), esc_attr( $tab_name ), $active_tab == $tab_id ? ' nav-tab-active' : '', esc_html( $tab_name ) ); } ?> </h2> <div id="tab_container"> <?php do_action( 'pum_tools_page_tab_' . $active_tab ); ?> <?php do_action( 'popmake_tools_page_tab_' . $active_tab ); ?> </div> </form> </div> <?php }
Expand full source code Collapse full source code View on Trac