Make WordPress Themes


Ignore:
Timestamp:
10/27/2021 10:58:52 AM (4 years ago)
Author:
themedropbox
Message:

New version of Sydney - 1.84

Location:
sydney/1.84
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sydney/1.84/inc/customizer/customizer.php

    r156111 r156796  
    1616        $wp_customize->get_section( 'title_tagline' )->panel = 'sydney_panel_header';
    1717    }
    18 
    19     $wp_customize->get_section( 'colors' )->title = __('General', 'sydney');
    20     $wp_customize->get_section( 'colors' )->panel = 'sydney_colors_panel';
    21     $wp_customize->get_section( 'colors' )->priority = '10';
    2218
    2319    //Partials
     
    8480    require get_template_directory() . '/inc/customizer/controls/class_sydney_divider_control.php';
    8581    require get_template_directory() . '/inc/customizer/controls/toggle/class_sydney_toggle_control.php';
    86     //require get_template_directory() . '/inc/customizer/controls/color-palettes/class_sydney_color_palettes_control.php';
    87     //require get_template_directory() . '/inc/customizer/controls/color-palettes/class_sydney_custom_palettes_control.php';
    88     //require get_template_directory() . '/inc/customizer/controls/accordion/class_sydney_accordion_control.php';   
     82    require get_template_directory() . '/inc/customizer/controls/accordion/class_sydney_accordion_control.php';   
    8983
    9084    require get_template_directory() . '/inc/customizer/controls/control-checkbox-multiple.php';
     
    10599    require get_template_directory() . '/inc/customizer/options/blog.php';
    106100    require get_template_directory() . '/inc/customizer/options/blog-single.php';
     101    require get_template_directory() . '/inc/customizer/options/colors.php';
     102    if ( class_exists( 'Woocommerce' ) ) {
     103        require get_template_directory() . '/inc/customizer/options/woocommerce.php';
     104        require get_template_directory() . '/inc/customizer/options/woocommerce-single.php';
     105    }
     106
    107107
    108108    //___Header area___//
     
    998998    );
    999999
    1000     //___Colors___//
    1001     $wp_customize->add_panel( 'sydney_colors_panel', array(
    1002         'priority'       => 19,
    1003         'capability'     => 'edit_theme_options',
    1004         'theme_supports' => '',
    1005         'title'          => __('Colors', 'sydney'),
    1006     ) );
    1007     $wp_customize->add_section(
    1008         'colors_header',
    1009         array(
    1010             'title'         => __('Header', 'sydney'),
    1011             'priority'      => 11,
    1012             'panel'         => 'sydney_colors_panel',
    1013         )
    1014     );
    1015     $wp_customize->add_section(
    1016         'colors_sidebar',
    1017         array(
    1018             'title'         => __('Sidebar', 'sydney'),
    1019             'priority'      => 12,
    1020             'panel'         => 'sydney_colors_panel',
    1021         )
    1022     );   
    1023     $wp_customize->add_setting(
    1024         'primary_color',
    1025         array(
    1026             'default'           => '#d65050',
    1027             'sanitize_callback' => 'sanitize_hex_color',
    1028             'transport'         => 'postMessage'
    1029         )
    1030     );
    1031     $wp_customize->add_control(
    1032         new WP_Customize_Color_Control(
    1033             $wp_customize,
    1034             'primary_color',
    1035             array(
    1036                 'label'         => __('Primary color', 'sydney'),
    1037                 'section'       => 'colors',
    1038                 'settings'      => 'primary_color',
    1039                 'priority'      => 11
    1040             )
    1041         )
    1042     );
    1043     //Menu bg
    1044     $wp_customize->add_setting(
    1045         'menu_bg_color',
    1046         array(
    1047             'default'           => '#263246',
    1048             'sanitize_callback' => 'sanitize_hex_color',
    1049         )
    1050     );
    1051     $wp_customize->add_control(
    1052         new WP_Customize_Color_Control(
    1053             $wp_customize,
    1054             'menu_bg_color',
    1055             array(
    1056                 'label' => __('Menu background', 'sydney'),
    1057                 'section' => 'colors_header',
    1058                 'priority' => 12
    1059             )
    1060         )
    1061     );     
    1062 
    1063     if ( false == get_option('sydney-update-header' ) ) {
    1064         //Site title
    1065         $wp_customize->add_setting(
    1066             'site_title_color',
    1067             array(
    1068                 'default'           => '#ffffff',
    1069                 'sanitize_callback' => 'sanitize_hex_color',
    1070                 'transport'         => 'postMessage'
    1071             )
    1072         );
    1073         $wp_customize->add_control(
    1074             new WP_Customize_Color_Control(
    1075                 $wp_customize,
    1076                 'site_title_color',
    1077                 array(
    1078                     'label' => __('Site title', 'sydney'),
    1079                     'section' => 'colors_header',
    1080                     'settings' => 'site_title_color',
    1081                     'priority' => 13
    1082                 )
    1083             )
    1084         );
    1085         //Site desc
    1086         $wp_customize->add_setting(
    1087             'site_desc_color',
    1088             array(
    1089                 'default'           => '#ffffff',
    1090                 'sanitize_callback' => 'sanitize_hex_color',
    1091                 'transport'         => 'postMessage'
    1092             )
    1093         );
    1094         $wp_customize->add_control(
    1095             new WP_Customize_Color_Control(
    1096                 $wp_customize,
    1097                 'site_desc_color',
    1098                 array(
    1099                     'label' => __('Site description', 'sydney'),
    1100                     'section' => 'colors_header',
    1101                     'priority' => 14
    1102                 )
    1103             )
    1104         );
    1105     }
    1106 
    1107     //Top level menu items
    1108     $wp_customize->add_setting(
    1109         'top_items_color',
    1110         array(
    1111             'default'           => '#ffffff',
    1112             'sanitize_callback' => 'sanitize_hex_color',
    1113             'transport'         => 'postMessage'
    1114         )
    1115     );
    1116     $wp_customize->add_control(
    1117         new WP_Customize_Color_Control(
    1118             $wp_customize,
    1119             'top_items_color',
    1120             array(
    1121                 'label' => __('Top level menu items', 'sydney'),
    1122                 'section' => 'colors_header',
    1123                 'priority' => 15
    1124             )
    1125         )
    1126     );
    1127     //Menu items hover
    1128     $wp_customize->add_setting(
    1129         'menu_items_hover',
    1130         array(
    1131             'default'           => '#d65050',
    1132             'sanitize_callback' => 'sanitize_hex_color',
    1133         )
    1134     );
    1135     $wp_customize->add_control(
    1136         new WP_Customize_Color_Control(
    1137             $wp_customize,
    1138             'menu_items_hover',
    1139             array(
    1140                 'label' => __('Menu items hover', 'sydney'),
    1141                 'section' => 'colors_header',
    1142                 'priority' => 15
    1143             )
    1144         )
    1145     );
    1146 
    1147     //Sub menu items color
    1148     $wp_customize->add_setting(
    1149         'submenu_items_color',
    1150         array(
    1151             'default'           => '#ffffff',
    1152             'sanitize_callback' => 'sanitize_hex_color',
    1153             'transport'         => 'postMessage'
    1154         )
    1155     );
    1156     $wp_customize->add_control(
    1157         new WP_Customize_Color_Control(
    1158             $wp_customize,
    1159             'submenu_items_color',
    1160             array(
    1161                 'label' => __('Sub-menu items', 'sydney'),
    1162                 'section' => 'colors_header',
    1163                 'priority' => 16
    1164             )
    1165         )
    1166     );
    1167     //Sub menu background
    1168     $wp_customize->add_setting(
    1169         'submenu_background',
    1170         array(
    1171             'default'           => '#1c1c1c',
    1172             'sanitize_callback' => 'sanitize_hex_color',
    1173         )
    1174     );
    1175     $wp_customize->add_control(
    1176         new WP_Customize_Color_Control(
    1177             $wp_customize,
    1178             'submenu_background',
    1179             array(
    1180                 'label' => __('Sub-menu background', 'sydney'),
    1181                 'section' => 'colors_header',
    1182                 'priority' => 17
    1183             )
    1184         )
    1185     );
    1186     //Mobile menu
    1187     $wp_customize->add_setting(
    1188         'mobile_menu_color',
    1189         array(
    1190             'default'           => '#ffffff',
    1191             'sanitize_callback' => 'sanitize_hex_color',
    1192         )
    1193     );
    1194     $wp_customize->add_control(
    1195         new WP_Customize_Color_Control(
    1196             $wp_customize,
    1197             'mobile_menu_color',
    1198             array(
    1199                 'label' => __('Mobile menu button', 'sydney'),
    1200                 'section' => 'colors_header',
    1201                 'priority' => 17
    1202             )
    1203         )
    1204     );   
    1205     //Slider text
    1206     $wp_customize->add_setting(
    1207         'slider_text',
    1208         array(
    1209             'default'           => '#ffffff',
    1210             'sanitize_callback' => 'sanitize_hex_color',
    1211             'transport'         => 'postMessage'
    1212         )
    1213     );
    1214     $wp_customize->add_control(
    1215         new WP_Customize_Color_Control(
    1216             $wp_customize,
    1217             'slider_text',
    1218             array(
    1219                 'label' => __('Hero slider text', 'sydney'),
    1220                 'section' => 'colors_header',
    1221                 'priority' => 18
    1222             )
    1223         )
    1224     );
    1225     //Body
    1226     $wp_customize->add_setting(
    1227         'body_text_color',
    1228         array(
    1229             'default'           => '#47425d',
    1230             'sanitize_callback' => 'sanitize_hex_color',
    1231             'transport'         => 'postMessage'
    1232         )
    1233     );
    1234     $wp_customize->add_control(
    1235         new WP_Customize_Color_Control(
    1236             $wp_customize,
    1237             'body_text_color',
    1238             array(
    1239                 'label' => __('Body text', 'sydney'),
    1240                 'section' => 'colors',
    1241                 'priority' => 19
    1242             )
    1243         )
    1244     );   
    1245     //Sidebar backgound
    1246     $wp_customize->add_setting(
    1247         'sidebar_background',
    1248         array(
    1249             'default'           => '#ffffff',
    1250             'sanitize_callback' => 'sanitize_hex_color',
    1251             'transport'         => 'postMessage'
    1252         )
    1253     );
    1254     $wp_customize->add_control(
    1255         new WP_Customize_Color_Control(
    1256             $wp_customize,
    1257             'sidebar_background',
    1258             array(
    1259                 'label' => __('Sidebar background', 'sydney'),
    1260                 'section' => 'colors_sidebar',
    1261                 'priority' => 20
    1262             )
    1263         )
    1264     );
    1265     //Sidebar color
    1266     $wp_customize->add_setting(
    1267         'sidebar_color',
    1268         array(
    1269             'default'           => '#767676',
    1270             'sanitize_callback' => 'sanitize_hex_color',
    1271             'transport'         => 'postMessage'
    1272         )
    1273     );
    1274     $wp_customize->add_control(
    1275         new WP_Customize_Color_Control(
    1276             $wp_customize,
    1277             'sidebar_color',
    1278             array(
    1279                 'label' => __('Sidebar color', 'sydney'),
    1280                 'section' => 'colors_sidebar',
    1281                 'priority' => 21
    1282             )
    1283         )
    1284     );
    1285 
    12861000    //___Theme info___//
    12871001    $wp_customize->add_section(
     
    13041018        'priority' => 10
    13051019        ) )
    1306     ); 
    1307 
    1308     /* Woocommerce */
    1309     //Sidebar
    1310     $wp_customize->add_setting(
    1311         'swc_sidebar_archives',
    1312         array(
    1313             'sanitize_callback' => 'sydney_sanitize_checkbox',
    1314         )       
    1315     );
    1316     $wp_customize->add_control(
    1317         'swc_sidebar_archives',
    1318         array(
    1319             'type'      => 'checkbox',
    1320             'label'     => __('Disable sidebar on shop archive pages?', 'sydney'),
    1321             'section'   => 'woocommerce_product_catalog',
    1322             'priority'  => 14,
    1323         )
    1324     ); 
    1325     //Show cart button on hover
    1326     $wp_customize->add_setting(
    1327         'wc_button_hover',
    1328         array(
    1329             'sanitize_callback' => 'sydney_sanitize_checkbox',
    1330         )       
    1331     );
    1332     $wp_customize->add_control(
    1333         'wc_button_hover',
    1334         array(
    1335             'type'      => 'checkbox',
    1336             'label'     => __('Show add to cart button on hover?', 'sydney'),
    1337             'section'   => 'woocommerce_product_catalog',
    1338             'priority'  => 14,
    1339         )
    1340     );     
    1341     //Sidebar
    1342     $wp_customize->add_section(
    1343         'sydney_wc_singles',
    1344         array(
    1345             'title'         => __('Single products', 'sydney'),
    1346             'panel'         => 'woocommerce',
    1347             'priority'      => 14,
    1348         )
    1349     );   
    1350     $wp_customize->add_setting(
    1351         'swc_sidebar_products',
    1352         array(
    1353             'sanitize_callback' => 'sydney_sanitize_checkbox',
    1354             'default'           => 1
    1355         )       
    1356     );
    1357     $wp_customize->add_control(
    1358         'swc_sidebar_products',
    1359         array(
    1360             'type'      => 'checkbox',
    1361             'label'     => __('Remove sidebar from single products?', 'sydney'),
    1362             'section'   => 'sydney_wc_singles',
    1363             'priority'  => 14,
    1364         )
    1365     );   
    1366     //YITH
    1367     $wp_customize->add_setting(
    1368         'yith_buttons_visible',
    1369         array(
    1370             'sanitize_callback' => 'sydney_sanitize_checkbox',
    1371         )       
    1372     );
    1373     $wp_customize->add_control(
    1374         'yith_buttons_visible',
    1375         array(
    1376             'type'          => 'checkbox',
    1377             'label'         => __('Always show buttons for YITH quick view, wishlist and compare?', 'sydney'),
    1378             'description'   => __('If you\'re using the plugins above, checking this option will keep their respective buttons always visible', 'sydney'),
    1379             'section'       => 'woocommerce_product_catalog',
    1380             'priority'      => 15,
    1381         )
    1382     );
    1383     //Disable overlay shop
    1384     $wp_customize->add_setting(
    1385         'hide_overlay_shop',
    1386         array(
    1387             'sanitize_callback' => 'sydney_sanitize_checkbox',
    1388         )       
    1389     );
    1390     $wp_customize->add_control(
    1391         'hide_overlay_shop',
    1392         array(
    1393             'type'      => 'checkbox',
    1394             'label'     => __('Disable header image overlay on shop main page?', 'sydney'),
    1395             'section'   => 'woocommerce_product_catalog',
    1396             'priority'  => 16,
    1397         )
    1398     );             
     1020    );
    13991021
    14001022}
     
    15391161 */
    15401162function sydney_customize_preview_js() {
    1541     wp_enqueue_script( 'sydney_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20211009', true );
     1163    wp_enqueue_script( 'sydney_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20211026', true );
    15421164}
    15431165add_action( 'customize_preview_init', 'sydney_customize_preview_js' );
     
    15481170function sydney_customize_footer_scripts() {
    15491171   
    1550     wp_enqueue_style( 'sydney-customizer-styles', get_template_directory_uri() . '/css/customizer.css', '', '20211009' );
    1551     wp_enqueue_script( 'sydney-customizer-scripts', get_template_directory_uri() . '/js/customize-controls.js', array( 'jquery', 'jquery-ui-core' ), '20211009', true );
     1172    wp_enqueue_style( 'sydney-customizer-styles', get_template_directory_uri() . '/css/customizer.css', '', '20211026' );
     1173    wp_enqueue_script( 'sydney-customizer-scripts', get_template_directory_uri() . '/js/customize-controls.js', array( 'jquery', 'jquery-ui-core' ), '20211026', true );
    15521174
    15531175}
Note: See TracChangeset for help on using the changeset viewer.