container.tpl.php (2452B)
1 <?php 2 /** 3 * The template for the main panel container. 4 * Override this template by specifying the path where it is stored (templates_path) in your Redux config. 5 * 6 * @author Redux Framework 7 * @package ReduxFramework/Templates 8 * @version: 4.0.0 9 */ 10 11 $expanded = ( $this->parent->args['open_expanded'] ) ? ' fully-expanded' : '' . ( ! empty( $this->parent->args['class'] ) ? ' ' . esc_attr( $this->parent->args['class'] ) : '' ); 12 $nonce = wp_create_nonce( 'redux_ajax_nonce' . $this->parent->args['opt_name'] ); 13 $actionn = ( 'network' === $this->parent->args['database'] && $this->parent->args['network_admin'] && is_network_admin() ? './edit.php?action=redux_' . $this->parent->args['opt_name'] : './options.php' ); 14 15 // Last tab? 16 $this->parent->options['last_tab'] = ( isset( $_GET['tab'] ) && ! isset( $this->parent->transients['last_save_mode'] ) ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification 17 18 ?> 19 <div 20 class="redux-container<?php echo esc_attr( $expanded ); ?>"> 21 22 <form 23 method="post" 24 action="<?php echo esc_attr( $actionn ); ?>" 25 data-nonce="<?php echo esc_attr( $nonce ); ?>" 26 enctype="multipart/form-data" 27 class="redux-form-wrapper" 28 data-opt-name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>"> 29 <input 30 type="hidden" id="redux-compiler-hook" 31 name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[compiler]" 32 value=""/> 33 <input 34 type="hidden" id="currentSection" 35 name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[redux-section]" 36 value=""/> 37 <?php if ( ! empty( $this->parent->options_class->no_panel ) ) { ?> 38 <input 39 type="hidden" 40 name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[redux-no_panel]" 41 value="<?php echo esc_attr( implode( '|', $this->parent->options_class->no_panel ) ); ?>"/> 42 <?php } ?> 43 <?php $this->init_settings_fields(); // Must run or the page won't redirect properly. ?> 44 <input 45 type="hidden" id="last_tab" 46 name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[last_tab]" 47 value="<?php echo esc_attr( $this->parent->options['last_tab'] ); ?>"/> 48 <?php $this->get_template( 'content.tpl.php' ); ?> 49 </form> 50 </div> 51 52 <?php if ( isset( $this->parent->args['footer_text'] ) ) { ?> 53 <div id="redux-sub-footer"><?php echo wp_kses_post( $this->parent->args['footer_text'] ); ?></div> 54 <?php } ?>