';
echo esc_html__( 'All settings of the front part of the theme are located in the visual editor', 'airin-blog' );
echo ' » ' . esc_html__( 'Open', 'airin-blog' ) . '';
echo '
',
'',
'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' );
// ------------------------------------------------------------
// CALLBACK - Support links
// ------------------------------------------------------------
// Support
if ( !defined( 'DMCWZAF_VERSION' ) ) {
function airinblog_fun_callback_support_contact() {
echo '
' . 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' ) . '
' . esc_html__( 'You can change this setting to control the size of the images yourself.', 'airin-blog' ) . '
' . sprintf( 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 %s media library.', 'airin-blog' ), 'WordPress' ) . '
' . esc_html__( 'To change old pictures, use the thumbnail regeneration plugin.', 'airin-blog' ) . '
';
}
// ------------------------------------------------------------
// 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' ) . '
' . sprintf( 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 %s media library.', 'airin-blog' ), 'WordPress' ) . '
' . esc_html__( 'To change old pictures, use the thumbnail regeneration plugin.', 'airin-blog' ) . '