$typ, 'id' => 'hook_before_head', 'desc' => '', ); $add( 'airinblog_set_hook_before_head', sprintf( esc_html__( 'Before the closing %s tag', 'airin-blog' ), 'HEAD' ), $display, $slug, $section, $set ); $set = array( 'type' => $typ, 'id' => 'hook_before_body', 'desc' => '', ); $add( 'airinblog_set_hook_before_body', sprintf( esc_html__( 'Before the closing %s tag', 'airin-blog' ), 'BODY' ), $display, $slug, $section, $set ); // Display text premium $add( 'airinblog_set_hook_text_premium', '', 'airinblog_fun_callback_hook_premium', $slug, $section ); } add_action( 'admin_init', 'airinblog_fun_theme_option_settings_hooks' ); //? ========== Display text dis hooks function airinblog_fun_callback_dis_hooks() { echo esc_html__( 'On this page you can insert counters, banners, or any other content that will be displayed on the front of the site', 'airin-blog' ); } //? ========== Display text premium function airinblog_fun_callback_hook_premium() { echo '
'; echo esc_html__( 'Get even more windows to insert codes in the premium version', 'airin-blog' ) . ' - '; echo '' . esc_html__( 'Read More', 'airin-blog' ) . ''; echo '
'; } //? ========== Display input fields function airinblog_fun_theme_display_settings_hooks( $args ) { $desc = ''; extract( $args ); $opt_name = 'theme_options_hooks'; $o = get_option( $opt_name ); $text = ( isset( $o[$id] ) ? $o[$id] : '' ); if ( $desc != '' ) { $d = "
{$desc}"; } else { $d = ""; } switch ( $type ) { case 'textarea': echo ""; echo wp_kses_post( $d ); break; } } //? ========== Input validation function airinblog_fun_theme_validate_settings_hooks( $input ) { foreach ( $input as $k => $v ) { $valid_input[$k] = trim( $v ); } return $valid_input; }