' . esc_html__( 'All settings saved!', 'airin-blog' ) . '

'; } } add_action( 'admin_notices', 'airinblog_fun_options_notice' ); // Display the options page function airinblog_fun_settings_function() { ?>


' . esc_html__( 'Images format', 'airin-blog' ), '', 'general-tab' ); // Setting the size of the main image of posts and pages (width) add_settings_field( 'airinblog_set_size_imgs_all', esc_html__( 'Choose which images to use for the entire site', 'airin-blog' ), 'airinblog_fun_callback_size_img_all', 'general-tab', 'airinblog_set_section_img_all' ); register_setting( 'general-tab', 'airinblog_set_size_imgs_all' ); // ------------------------------------------------------------ // Main post image // ------------------------------------------------------------ // Section add_settings_section( 'airinblog_set_section_thumb_post', '

' . esc_html__( 'Main post image', 'airin-blog' ), '', 'general-tab' ); // Setting the size of the main image of posts and pages (width) add_settings_field( 'airinblog_set_size_img_post_w', esc_html__( 'Add a new image size and apply the default for the main image of posts and pages', 'airin-blog' ), 'airinblog_fun_callback_size_img_post_w_front', 'general-tab', 'airinblog_set_section_thumb_post', array( 'label_for' => 'airinblog_set_size_img_post_w', 'class' => 'airinblog-class', 'name' => 'airinblog_set_size_img_post_w', ) ); register_setting( 'general-tab', 'airinblog_set_size_img_post_w', 'absint' ); // Setting the size of the main image of posts and pages (height) add_settings_field( 'airinblog_set_size_img_post_h', esc_html__( 'To restore the default settings, clear the field data and save', 'airin-blog' ), 'airinblog_fun_callback_size_img_post_h_front', 'general-tab', 'airinblog_set_section_thumb_post', array( 'label_for' => 'airinblog_set_size_img_post_h', 'class' => 'airinblog-class', 'name' => 'airinblog_set_size_img_post_h', ) ); register_setting( 'general-tab', 'airinblog_set_size_img_post_h', 'absint' ); } add_action( 'admin_init', 'airinblog_fun_theme_settings' ); // Support links function airinblog_fun_callback_support() { $help_links = array( 'demo' => array( 'link' => '//web-zone.org/airin-blog', 'text' => esc_html__( 'View demo', 'airin-blog' ), ), 'rating' => array( 'link' => '//wordpress.org/support/theme/airin-blog/reviews/', 'text' => esc_html__( 'Rate this theme', 'airin-blog' ), ), ); foreach ( $help_links as $help_link ) { echo '

' . esc_attr( $help_link['text'] ) . '

'; } } // ------------------------------------------------------------ // CALLBACK - Button visual editor // ------------------------------------------------------------ // Button - Go to visual editor function airinblog_fun_callback_visual_editor() { $customize_url = admin_url( 'customize.php?return=%2Fwp-admin%2Fthemes.php%3Fpage%3Ddmcwzmulti_page_settings' ); echo '

' . esc_html__( 'All settings of the front part of the theme are located in the visual editor', 'airin-blog' ) . '

'; echo '' . esc_html__( 'Go to visual editor', 'airin-blog' ) . '

'; echo '
'; } // ------------------------------------------------------------ // CALLBACK - Title various settings // ------------------------------------------------------------ // Title various settings function airinblog_fun_callback_title_settings() { echo '

' . esc_html__( 'Expert settings of the administrative part of the theme', 'airin-blog' ) . '

'; } // ------------------------------------------------------------ // CALLBACK - Images format // ------------------------------------------------------------ function airinblog_fun_callback_size_img_all() { $opt = get_option( 'airinblog_set_size_imgs_all' ); $html = '

'; $html .= esc_html__( 'The theme creates multiple thumbnail sizes in a single 16x9 format and uses optimal sizes in the right places. This has a good effect on loading speed and proper display in a unified style.', 'airin-blog' ); $html .= '

'; $html .= esc_html__( 'You can change this setting to control the size of the images yourself.', 'airin-blog' ); $html .= '

'; $html .= '
'; $html .= '

'; $html .= ''; $html .= '

'; $html .= '

'; $html .= esc_html__( 'It is important to know! These settings cannot delete or modify existing image files. Slicing of images occurs at the time of uploading a new image to the WordPress media library.', 'airin-blog' ); $html .= '

'; $html .= esc_html__( 'To change old pictures, use the thumbnail regeneration plugin.', 'airin-blog' ); $html .= '

'; echo $html; } // ------------------------------------------------------------ // CALLBACK - Main image for post // ------------------------------------------------------------ // Adjusting the size of the main post image function airinblog_fun_callback_size_img_post_w_front( $args ) { $value = get_option( $args['name'] ); printf( '

' . esc_html__( 'These settings register a new size for the main (top) image of posts and pages.', 'airin-blog' ) . '

' . esc_html__( 'After applying, all new uploaded images will be supplemented with the new size, which is apply by default for the main image of posts and pages.', 'airin-blog' ) . '


' . esc_html__( 'Width', 'airin-blog' ) . ' px. (' . esc_html__( 'default', 'airin-blog' ) . ' - 0) ', esc_attr( $args['name'] ), esc_attr( $args['name'] ), absint( $value ) ); } // Adjusting the size of the main post image function airinblog_fun_callback_size_img_post_h_front( $args ) { $value = get_option( $args['name'] ); printf( esc_html__( 'Height', 'airin-blog' ) . ' px. (' . esc_html__( 'default', 'airin-blog' ) . ' - 0)

' . esc_html__( 'It is important to know! These settings cannot delete or modify existing image files. Slicing of images occurs at the time of uploading a new image to the WordPress media library.', 'airin-blog' ) . '

' . esc_html__( 'To change old pictures, use the thumbnail regeneration plugin.', 'airin-blog' ) . '

', esc_attr( $args['name'] ), esc_attr( $args['name'] ), absint( $value ) ); }