changed orgization

This commit is contained in:
2024-07-15 22:55:37 -07:00
parent 3f5fb31e99
commit 0f9e1492cc
6 changed files with 63 additions and 126 deletions

View File

@@ -26,29 +26,6 @@ function sophia_after_dark_customize_general_panels_sections_register( $wp_custo
)
);
/**
* Toggle field for Enable/Disable preloader.
*
*/
$wp_customize->add_setting( 'sophia_after_dark_enable_preloader',
array(
'capability' => 'edit_theme_options',
'default' => true,
'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox'
)
);
$wp_customize->add_control( new Sophia_After_Dark_Control_Toggle(
$wp_customize, 'sophia_after_dark_enable_preloader',
array(
'label' => __( 'Enable Preloader', 'sophia-after-dark' ),
'section' => 'sophia_after_dark_section_site',
'settings' => 'sophia_after_dark_enable_preloader',
'priority' => 5,
)
)
);
/**
* Toggle field for Enable/Disable wow animation.
@@ -72,7 +49,30 @@ function sophia_after_dark_customize_general_panels_sections_register( $wp_custo
)
)
);
$wp_customize->add_control(new WP_Customize_Image_control(
$wp_customize, 'sophia_after_dark_home_og_image', array(
'label' => __('Home Page Open Graph Image', 'sophia_after_dark'),
'section' => 'sophia_after_dark_section_site',
'settings' => 'sophia_after_dark_home_og_image',
'priority' => 15,
)
)
);
$users = get_users();
$user_choices = array();
foreach ($users as $user) {
$user_choices[$user->ID] = $user->display_name;
}
$wp_customize->add_control('sophia_after_dark_home_og_user', array(
'label' => __('Select User for Open Graph Tags', 'sophia_after_dark'),
'section' => 'sophia_after_dark_section_site',
'settings' => 'sophia_after_dark_home_og_user',
'type' => 'select',
'choices' => $user_choices,
'priority' => 20,
)
);
/**
* Radio image field for Archive Sidebar
*
@@ -91,7 +91,7 @@ function sophia_after_dark_customize_general_panels_sections_register( $wp_custo
'description' => __( 'Choose site layout from available layouts', 'sophia-after-dark' ),
'section' => 'sophia_after_dark_section_site',
'settings' => 'sophia_after_dark_site_layout',
'priority' => 15,
'priority' => 25,
'choices' => array(
'site-layout--wide' => get_template_directory_uri() . '/assets/images/full-width.png',
'site-layout--boxed' => get_template_directory_uri() . '/assets/images/boxed-layout.png'
@@ -118,7 +118,7 @@ function sophia_after_dark_customize_general_panels_sections_register( $wp_custo
'description' => __( 'Enable/disable Block-based Widgets Editor(since WordPress 5.8).', 'sophia-after-dark' ),
'section' => 'sophia_after_dark_section_site',
'settings' => 'sophia_after_dark_enable_widgets_editor',
'priority' => 15,
'priority' => 25,
)
)
);