Changeset 178958
- Timestamp:
- 11/05/2022 10:55:45 AM (3 years ago)
- Location:
- vw-restaurant-lite/1.8.4
- Files:
-
- 9 edited
- 1 copied
-
. (copied) (copied from vw-restaurant-lite/1.8.3)
-
functions.php (modified) (2 diffs)
-
inc/customizer.php (modified) (8 diffs)
-
inline-style.php (modified) (1 diff)
-
languages/vw-restaurant-lite.pot (modified) (4 diffs)
-
page-template/custom-home-page.php (modified) (1 diff)
-
page.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
single.php (modified) (6 diffs)
-
style.css (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vw-restaurant-lite/1.8.4/functions.php
r178040 r178958 9 9 * Set the content width based on the theme's design and stylesheet. 10 10 */ 11 12 /* Breadcrumb Begin */ 13 function vw_restaurant_lite_the_breadcrumb() { 14 if (!is_home()) { 15 echo '<a href="'; 16 echo esc_url( home_url() ); 17 echo '">'; 18 bloginfo('name'); 19 echo "</a> "; 20 if (is_category() || is_single()) { 21 the_category(','); 22 if (is_single()) { 23 echo "<span> "; 24 the_title(); 25 echo "</span> "; 26 } 27 } elseif (is_page()) { 28 echo "<span> "; 29 the_title(); 30 } 31 } 32 } 11 33 12 34 /* Theme Setup */ … … 459 481 } 460 482 483 if ( ! defined( 'VW_RESTAURANT_LITE_GETSTARTED_URL' ) ) { 484 define( 'VW_RESTAURANT_LITE_GETSTARTED_URL', 'themes.php?page=vw_restaurant_lite_guide'); 485 } 486 487 //Active Callback 488 function vw_restaurant_lite_default_slider(){ 489 if(get_theme_mod('vw_restaurant_lite_slider_type', 'Default slider') == 'Default slider' ) { 490 return true; 491 } 492 return false; 493 } 494 495 function vw_restaurant_lite_advance_slider(){ 496 if(get_theme_mod('vw_restaurant_lite_slider_type', 'Default slider') == 'Advance slider' ) { 497 return true; 498 } 499 return false; 500 } 501 461 502 /* Custom template tags for this theme. */ 462 503 require get_template_directory() . '/inc/template-tags.php'; -
vw-restaurant-lite/1.8.4/inc/customizer.php
r178040 r178958 35 35 )); 36 36 37 //add home page setting pannel 37 38 $VWRestaurantLiteParentPanel = new VW_Restaurant_Lite_WP_Customize_Panel( $wp_customize, 'vw_restaurant_lite_panel_id', array( 38 39 'capability' => 'edit_theme_options', … … 42 43 )); 43 44 45 $wp_customize->add_panel( $VWRestaurantLiteParentPanel ); 46 47 $HomePageParentPanel = new VW_Restaurant_Lite_WP_Customize_Panel( $wp_customize, 'vw_restaurant_lite_homepage_panel', array( 48 'title' => __( 'Homepage Settings', 'vw-restaurant-lite' ), 49 'panel' => 'vw_restaurant_lite_panel_id', 50 )); 51 52 $wp_customize->add_panel( $HomePageParentPanel ); 53 54 //Topbar section 55 $wp_customize->add_section('vw_restaurant_lite_topbar_icon',array( 56 'title' => __('Topbar Section','vw-restaurant-lite'), 57 'description' => __('Add Top Header Content here','vw-restaurant-lite'), 58 'priority' => null, 59 'panel' => 'vw_restaurant_lite_homepage_panel', 60 )); 61 62 $wp_customize->add_setting( 'vw_restaurant_lite_topbar_hide_show',array( 63 'default' => 0, 64 'transport' => 'refresh', 65 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 66 )); 67 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_topbar_hide_show',array( 68 'label' => esc_html__( 'Show / Hide Topbar','vw-restaurant-lite' ), 69 'section' => 'vw_restaurant_lite_topbar_icon' 70 ))); 71 72 $wp_customize->add_setting('vw_restaurant_lite_topbar_padding_top_bottom',array( 73 'default'=> '', 74 'sanitize_callback' => 'sanitize_text_field' 75 )); 76 $wp_customize->add_control('vw_restaurant_lite_topbar_padding_top_bottom',array( 77 'label' => __('Topbar Padding Top Bottom','vw-restaurant-lite'), 78 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 79 'input_attrs' => array( 80 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 81 ), 82 'section'=> 'vw_restaurant_lite_topbar_icon', 83 'type'=> 'text' 84 )); 85 86 //Sticky Header 87 $wp_customize->add_setting( 'vw_restaurant_lite_sticky_header',array( 88 'default' => 0, 89 'transport' => 'refresh', 90 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 91 ) ); 92 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_sticky_header',array( 93 'label' => esc_html__( 'Sticky Header','vw-restaurant-lite' ), 94 'section' => 'vw_restaurant_lite_topbar_icon' 95 ))); 96 97 $wp_customize->add_setting('vw_restaurant_lite_sticky_header_padding',array( 98 'default'=> '', 99 'sanitize_callback' => 'sanitize_text_field' 100 )); 101 $wp_customize->add_control('vw_restaurant_lite_sticky_header_padding',array( 102 'label' => __('Sticky Header Padding','vw-restaurant-lite'), 103 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 104 'input_attrs' => array( 105 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 106 ), 107 'section'=> 'vw_restaurant_lite_topbar_icon', 108 'type'=> 'text' 109 )); 110 111 $wp_customize->add_setting('vw_restaurant_lite_navigation_menu_font_size',array( 112 'default'=> '', 113 'sanitize_callback' => 'sanitize_text_field' 114 )); 115 $wp_customize->add_control('vw_restaurant_lite_navigation_menu_font_size',array( 116 'label' => __('Menus Font Size','vw-restaurant-lite'), 117 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 118 'input_attrs' => array( 119 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 120 ), 121 'section'=> 'vw_restaurant_lite_topbar_icon', 122 'type'=> 'text' 123 )); 124 125 $wp_customize->add_setting('vw_restaurant_lite_navigation_menu_font_weight',array( 126 'default' => 'Default', 127 'transport' => 'refresh', 128 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 129 )); 130 $wp_customize->add_control('vw_restaurant_lite_navigation_menu_font_weight',array( 131 'type' => 'select', 132 'label' => __('Menus Font Weight','vw-restaurant-lite'), 133 'section' => 'vw_restaurant_lite_topbar_icon', 134 'choices' => array( 135 'Default' => __('Default','vw-restaurant-lite'), 136 'Normal' => __('Normal','vw-restaurant-lite') 137 ), 138 ) ); 139 140 $wp_customize->add_setting('vw_restaurant_lite_header_menus_color', array( 141 'default' => '', 142 'sanitize_callback' => 'sanitize_hex_color', 143 )); 144 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_menus_color', array( 145 'label' => __('Menus Color', 'vw-restaurant-lite'), 146 'section' => 'vw_restaurant_lite_topbar_icon', 147 ))); 148 149 $wp_customize->add_setting('vw_restaurant_lite_header_menus_hover_color', array( 150 'default' => '', 151 'sanitize_callback' => 'sanitize_hex_color', 152 )); 153 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_menus_hover_color', array( 154 'label' => __('Menus Hover Color', 'vw-restaurant-lite'), 155 'section' => 'vw_restaurant_lite_topbar_icon', 156 ))); 157 158 $wp_customize->add_setting('vw_restaurant_lite_header_submenus_color', array( 159 'default' => '', 160 'sanitize_callback' => 'sanitize_hex_color', 161 )); 162 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_submenus_color', array( 163 'label' => __('Sub Menus Color', 'vw-restaurant-lite'), 164 'section' => 'vw_restaurant_lite_topbar_icon', 165 ))); 166 167 $wp_customize->add_setting('vw_restaurant_lite_header_submenus_hover_color', array( 168 'default' => '', 169 'sanitize_callback' => 'sanitize_hex_color', 170 )); 171 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_submenus_hover_color', array( 172 'label' => __('Sub Menus Hover Color', 'vw-restaurant-lite'), 173 'section' => 'vw_restaurant_lite_topbar_icon', 174 ))); 175 176 //Selective Refresh 177 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_contact', array( 178 'selector' => 'span.call', 179 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_contact', 180 )); 181 182 $wp_customize->add_setting('vw_restaurant_lite_cont_phone_icon',array( 183 'default' => 'fa fa-phone', 184 'sanitize_callback' => 'sanitize_text_field' 185 )); 186 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_cont_phone_icon',array( 187 'label' => __('Add Phone Number Icon','vw-restaurant-lite'), 188 'transport' => 'refresh', 189 'section' => 'vw_restaurant_lite_topbar_icon', 190 'setting' => 'vw_restaurant_lite_cont_phone_icon', 191 'type' => 'icon' 192 ))); 193 194 $wp_customize->add_setting('vw_restaurant_lite_contact',array( 195 'default' => '', 196 'sanitize_callback' => 'vw_restaurant_lite_sanitize_phone_number' 197 )); 198 199 $wp_customize->add_control('vw_restaurant_lite_contact',array( 200 'label' => __('Add Phone Number','vw-restaurant-lite'), 201 'section' => 'vw_restaurant_lite_topbar_icon', 202 'setting' => 'vw_restaurant_lite_contact', 203 'type' => 'text' 204 )); 205 206 $wp_customize->add_setting('vw_restaurant_lite_cont_email_icon',array( 207 'default' => 'fa fa-envelope', 208 'sanitize_callback' => 'sanitize_text_field' 209 )); 210 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_cont_email_icon',array( 211 'label' => __('Add Email Icon','vw-restaurant-lite'), 212 'transport' => 'refresh', 213 'section' => 'vw_restaurant_lite_topbar_icon', 214 'setting' => 'vw_restaurant_lite_cont_email_icon', 215 'type' => 'icon' 216 ))); 217 218 $wp_customize->add_setting('vw_restaurant_lite_email',array( 219 'default' => '', 220 'sanitize_callback' => 'sanitize_email' 221 )); 222 223 $wp_customize->add_control('vw_restaurant_lite_email',array( 224 'label' => __('Add Email','vw-restaurant-lite'), 225 'section' => 'vw_restaurant_lite_topbar_icon', 226 'setting' => 'vw_restaurant_lite_email', 227 'type' => 'text' 228 )); 229 230 //Social links 231 $wp_customize->add_section( 232 'vw_restaurant_lite_social_links', array( 233 'title' => __('Social Links', 'vw-restaurant-lite'), 234 'priority' => null, 235 'panel' => 'vw_restaurant_lite_homepage_panel' 236 ) 237 ); 238 239 $wp_customize->add_setting('vw_restaurant_lite_social_icons',array( 240 'default'=> '', 241 'sanitize_callback' => 'sanitize_text_field' 242 )); 243 $wp_customize->add_control('vw_restaurant_lite_social_icons',array( 244 'label' => __('Steps to setup social icons','vw-restaurant-lite'), 245 'description' => __('<p>1. Go to Dashboard >> Appearance >> Widgets</p> 246 <p>2. Add Vw Social Icon Widget in Social Icon area.</p> 247 <p>3. Add social icons url and save.</p>','vw-restaurant-lite'), 248 'section'=> 'vw_restaurant_lite_social_links', 249 'type'=> 'hidden' 250 )); 251 $wp_customize->add_setting('vw_restaurant_lite_social_icon_btn',array( 252 'default'=> '', 253 'sanitize_callback' => 'sanitize_text_field' 254 )); 255 $wp_customize->add_control('vw_restaurant_lite_social_icon_btn',array( 256 'description' => "<a target='_blank' href='". admin_url('widgets.php') ." '>Setup Social Icons</a>", 257 'section'=> 'vw_restaurant_lite_social_links', 258 'type'=> 'hidden' 259 )); 260 261 //home page slider 262 $wp_customize->add_section( 'vw_restaurant_lite_slidersettings' , array( 263 'title' => __( 'Slider Settings', 'vw-restaurant-lite' ), 264 'description' => "Free theme has 3 slides options, For unlimited slides and more options </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>", 265 'priority' => null, 266 'panel' => 'vw_restaurant_lite_homepage_panel' 267 ) ); 268 269 $wp_customize->add_setting( 'vw_restaurant_lite_slider_hide_show',array( 270 'default' => 0, 271 'transport' => 'refresh', 272 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 273 )); 274 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_slider_hide_show',array( 275 'label' => esc_html__( 'Show / Hide Slider','vw-restaurant-lite' ), 276 'section' => 'vw_restaurant_lite_slidersettings' 277 ))); 278 279 $wp_customize->add_setting('vw_restaurant_lite_slider_type',array( 280 'default' => 'Default slider', 281 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 282 ) ); 283 $wp_customize->add_control('vw_restaurant_lite_slider_type', array( 284 'type' => 'select', 285 'label' => __('Slider Type','vw-restaurant-lite'), 286 'section' => 'vw_restaurant_lite_slidersettings', 287 'choices' => array( 288 'Default slider' => __('Default slider','vw-restaurant-lite'), 289 'Advance slider' => __('Advance slider','vw-restaurant-lite'), 290 ), 291 )); 292 293 $wp_customize->add_setting('vw_restaurant_lite_advance_slider_shortcode',array( 294 'default'=> '', 295 'sanitize_callback' => 'sanitize_text_field' 296 )); 297 $wp_customize->add_control('vw_restaurant_lite_advance_slider_shortcode',array( 298 'label' => __('Add Slider Shortcode','vw-restaurant-lite'), 299 'section'=> 'vw_restaurant_lite_slidersettings', 300 'type'=> 'text', 301 'active_callback' => 'vw_restaurant_lite_advance_slider' 302 )); 303 304 //Selective Refresh 305 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_slider_hide_show',array( 306 'selector' => '.slider .inner_carousel h1', 307 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_slider_hide_show', 308 )); 309 310 for ( $count = 1; $count <= 3; $count++ ) { 311 // Add color scheme setting and control. 312 $wp_customize->add_setting( 'vw_restaurant_lite_slider_page' . $count, array( 313 'default' => '', 314 'sanitize_callback' => 'vw_restaurant_lite_sanitize_dropdown_pages' 315 ) ); 316 $wp_customize->add_control( 'vw_restaurant_lite_slider_page' . $count, array( 317 'label' => __( 'Select Slide Image Page', 'vw-restaurant-lite' ), 318 'description' => __('Slider image size (1284 x 546)','vw-restaurant-lite'), 319 'section' => 'vw_restaurant_lite_slidersettings', 320 'type' => 'dropdown-pages', 321 'active_callback' => 'vw_restaurant_lite_default_slider' 322 ) ); 323 } 324 325 $wp_customize->add_setting('vw_restaurant_lite_slider_button_text',array( 326 'default'=> '', 327 'sanitize_callback' => 'sanitize_text_field' 328 )); 329 $wp_customize->add_control('vw_restaurant_lite_slider_button_text',array( 330 'label' => __('Add Slider Button Text','vw-restaurant-lite'), 331 'input_attrs' => array( 332 'placeholder' => __( 'READ MORE', 'vw-restaurant-lite' ), 333 ), 334 'section'=> 'vw_restaurant_lite_slidersettings', 335 'type'=> 'text', 336 'active_callback' => 'vw_restaurant_lite_default_slider' 337 )); 338 339 //content layout 340 $wp_customize->add_setting('vw_restaurant_lite_slider_content_option',array( 341 'default' => 'Center', 342 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 343 )); 344 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_slider_content_option', array( 345 'type' => 'select', 346 'label' => __('Slider Content Layouts','vw-restaurant-lite'), 347 'section' => 'vw_restaurant_lite_slidersettings', 348 'choices' => array( 349 'Left' => esc_url(get_template_directory_uri()).'/images/slider-content1.png', 350 'Center' => esc_url(get_template_directory_uri()).'/images/slider-content2.png', 351 'Right' => esc_url(get_template_directory_uri()).'/images/slider-content3.png', 352 ),'active_callback' => 'vw_restaurant_lite_default_slider' 353 ))); 354 355 //Slider content padding 356 $wp_customize->add_setting('vw_restaurant_lite_slider_content_padding_top_bottom',array( 357 'default'=> '', 358 'sanitize_callback' => 'sanitize_text_field' 359 )); 360 $wp_customize->add_control('vw_restaurant_lite_slider_content_padding_top_bottom',array( 361 'label' => __('Slider Content Padding Top Bottom','vw-restaurant-lite'), 362 'description' => __('Enter a value in %. Example:20%','vw-restaurant-lite'), 363 'input_attrs' => array( 364 'placeholder' => __( '50%', 'vw-restaurant-lite' ), 365 ), 366 'section'=> 'vw_restaurant_lite_slidersettings', 367 'type'=> 'text', 368 'active_callback' => 'vw_restaurant_lite_default_slider' 369 )); 370 371 $wp_customize->add_setting('vw_restaurant_lite_slider_content_padding_left_right',array( 372 'default'=> '', 373 'sanitize_callback' => 'sanitize_text_field' 374 )); 375 $wp_customize->add_control('vw_restaurant_lite_slider_content_padding_left_right',array( 376 'label' => __('Slider Content Padding Left Right','vw-restaurant-lite'), 377 'description' => __('Enter a value in %. Example:20%','vw-restaurant-lite'), 378 'input_attrs' => array( 379 'placeholder' => __( '50%', 'vw-restaurant-lite' ), 380 ), 381 'section'=> 'vw_restaurant_lite_slidersettings', 382 'type'=> 'text', 383 'active_callback' => 'vw_restaurant_lite_default_slider' 384 )); 385 386 //Slider excerpt 387 $wp_customize->add_setting( 'vw_restaurant_lite_slider_excerpt_number', array( 388 'default' => 30, 389 'transport' => 'refresh', 390 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range' 391 ) ); 392 $wp_customize->add_control( 'vw_restaurant_lite_slider_excerpt_number', array( 393 'label' => esc_html__( 'Slider Excerpt length','vw-restaurant-lite' ), 394 'section' => 'vw_restaurant_lite_slidersettings', 395 'type' => 'range', 396 'settings' => 'vw_restaurant_lite_slider_excerpt_number', 397 'input_attrs' => array( 398 'step' => 5, 399 'min' => 0, 400 'max' => 50, 401 ),'active_callback' => 'vw_restaurant_lite_default_slider' 402 ) ); 403 404 //Opacity 405 $wp_customize->add_setting('vw_restaurant_lite_slider_opacity_color',array( 406 'default' => 0.5, 407 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 408 )); 409 410 $wp_customize->add_control( 'vw_restaurant_lite_slider_opacity_color', array( 411 'label' => esc_html__( 'Slider Image Opacity','vw-restaurant-lite' ), 412 'section' => 'vw_restaurant_lite_slidersettings', 413 'type' => 'select', 414 'settings' => 'vw_restaurant_lite_slider_opacity_color', 415 'choices' => array( 416 '0' => esc_attr('0','vw-restaurant-lite'), 417 '0.1' => esc_attr('0.1','vw-restaurant-lite'), 418 '0.2' => esc_attr('0.2','vw-restaurant-lite'), 419 '0.3' => esc_attr('0.3','vw-restaurant-lite'), 420 '0.4' => esc_attr('0.4','vw-restaurant-lite'), 421 '0.5' => esc_attr('0.5','vw-restaurant-lite'), 422 '0.6' => esc_attr('0.6','vw-restaurant-lite'), 423 '0.7' => esc_attr('0.7','vw-restaurant-lite'), 424 '0.8' => esc_attr('0.8','vw-restaurant-lite'), 425 '0.9' => esc_attr('0.9','vw-restaurant-lite') 426 ),'active_callback' => 'vw_restaurant_lite_default_slider' 427 )); 428 429 //Slider height 430 $wp_customize->add_setting('vw_restaurant_lite_slider_height',array( 431 'default'=> '', 432 'sanitize_callback' => 'sanitize_text_field' 433 )); 434 $wp_customize->add_control('vw_restaurant_lite_slider_height',array( 435 'label' => __('Slider Height','vw-restaurant-lite'), 436 'description' => __('Specify the slider height (px).','vw-restaurant-lite'), 437 'input_attrs' => array( 438 'placeholder' => __( '500px', 'vw-restaurant-lite' ), 439 ), 440 'section'=> 'vw_restaurant_lite_slidersettings', 441 'type'=> 'text', 442 'active_callback' => 'vw_restaurant_lite_default_slider' 443 )); 444 445 $wp_customize->add_setting( 'vw_restaurant_lite_slider_speed', array( 446 'default' => 4000, 447 'sanitize_callback' => 'vw_restaurant_lite_sanitize_float' 448 ) ); 449 $wp_customize->add_control( 'vw_restaurant_lite_slider_speed', array( 450 'label' => esc_html__('Slider Transition Speed','vw-restaurant-lite'), 451 'section' => 'vw_restaurant_lite_slidersettings', 452 'type' => 'number', 453 'active_callback' => 'vw_restaurant_lite_default_slider' 454 ) ); 455 456 //we Believe 457 $wp_customize->add_section('vw_restaurant_lite_belive',array( 458 'title' => __('We Believe Section','vw-restaurant-lite'), 459 'description' => "For more options of believe section </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>", 460 'panel' => 'vw_restaurant_lite_homepage_panel', 461 )); 462 463 //Selective Refresh 464 $wp_customize->selective_refresh->add_partial( 'vw_restaurant_lite_belive_post_setting', array( 465 'selector' => '.we_belive a.button', 466 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_belive_post_setting', 467 )); 468 469 $args = array('numberposts' => -1); 470 $post_list = get_posts($args); 471 $posts[]='Select'; 472 foreach($post_list as $post){ 473 $posts[$post->post_title] = $post->post_title; 474 } 475 476 $wp_customize->add_setting('vw_restaurant_lite_belive_post_setting',array( 477 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices', 478 )); 479 $wp_customize->add_control('vw_restaurant_lite_belive_post_setting',array( 480 'type' => 'select', 481 'choices' => $posts, 482 'label' => __('Select post','vw-restaurant-lite'), 483 'section' => 'vw_restaurant_lite_belive', 484 )); 485 486 $wp_customize->add_setting('vw_restaurant_lite_about_button_text',array( 487 'default'=> '', 488 'sanitize_callback' => 'sanitize_text_field' 489 )); 490 $wp_customize->add_control('vw_restaurant_lite_about_button_text',array( 491 'label' => __('Add About Button Text','vw-restaurant-lite'), 492 'input_attrs' => array( 493 'placeholder' => __( 'ABOUT US', 'vw-restaurant-lite' ), 494 ), 495 'section'=> 'vw_restaurant_lite_belive', 496 'type'=> 'text' 497 )); 498 499 //Reservation Section 500 $wp_customize->add_section('vw_restaurant_lite_reservation', array( 501 'title' => __('Reservation Section', 'vw-restaurant-lite'), 502 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 503 'priority' => null, 504 'panel' => 'vw_restaurant_lite_homepage_panel', 505 )); 506 507 $wp_customize->add_setting('vw_restaurant_lite_reservation_text',array( 508 'default'=> '', 509 'sanitize_callback' => 'sanitize_text_field' 510 )); 511 $wp_customize->add_control('vw_restaurant_lite_reservation_text',array( 512 'description' => __('<p>1. More options for reservation section.</p> 513 <p>2. Unlimited images options.</p> 514 <p>3. Color options for reservation section.</p>','vw-restaurant-lite'), 515 'section'=> 'vw_restaurant_lite_reservation', 516 'type'=> 'hidden' 517 )); 518 519 $wp_customize->add_setting('vw_restaurant_lite_reservation_btn',array( 520 'default'=> '', 521 'sanitize_callback' => 'sanitize_text_field' 522 )); 523 $wp_customize->add_control('vw_restaurant_lite_reservation_btn',array( 524 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 525 'section'=> 'vw_restaurant_lite_reservation', 526 'type'=> 'hidden' 527 )); 528 529 530 //Services Section 531 $wp_customize->add_section('vw_restaurant_lite_services', array( 532 'title' => __('Services Section', 'vw-restaurant-lite'), 533 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 534 'priority' => null, 535 'panel' => 'vw_restaurant_lite_homepage_panel', 536 )); 537 538 $wp_customize->add_setting('vw_restaurant_lite_services_text',array( 539 'default'=> '', 540 'sanitize_callback' => 'sanitize_text_field' 541 )); 542 $wp_customize->add_control('vw_restaurant_lite_services_text',array( 543 'description' => __('<p>1. More options for services section.</p> 544 <p>2. Unlimited images options.</p> 545 <p>3. Color options for services section.</p>','vw-restaurant-lite'), 546 'section'=> 'vw_restaurant_lite_services', 547 'type'=> 'hidden' 548 )); 549 550 $wp_customize->add_setting('vw_restaurant_lite_services_btn',array( 551 'default'=> '', 552 'sanitize_callback' => 'sanitize_text_field' 553 )); 554 $wp_customize->add_control('vw_restaurant_lite_services_btn',array( 555 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 556 'section'=> 'vw_restaurant_lite_services', 557 'type'=> 'hidden' 558 )); 559 560 //Products Section 561 $wp_customize->add_section('vw_restaurant_lite_products', array( 562 'title' => __('Products Section', 'vw-restaurant-lite'), 563 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 564 'priority' => null, 565 'panel' => 'vw_restaurant_lite_homepage_panel', 566 )); 567 568 $wp_customize->add_setting('vw_restaurant_lite_products_text',array( 569 'default'=> '', 570 'sanitize_callback' => 'sanitize_text_field' 571 )); 572 $wp_customize->add_control('vw_restaurant_lite_products_text',array( 573 'description' => __('<p>1. More options for products section.</p> 574 <p>2. Unlimited images options.</p> 575 <p>3. Color options for products section.</p>','vw-restaurant-lite'), 576 'section'=> 'vw_restaurant_lite_products', 577 'type'=> 'hidden' 578 )); 579 580 $wp_customize->add_setting('vw_restaurant_lite_products_btn',array( 581 'default'=> '', 582 'sanitize_callback' => 'sanitize_text_field' 583 )); 584 $wp_customize->add_control('vw_restaurant_lite_products_btn',array( 585 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 586 'section'=> 'vw_restaurant_lite_products', 587 'type'=> 'hidden' 588 )); 589 590 //quotebox Section 591 $wp_customize->add_section('vw_restaurant_lite_quotebox', array( 592 'title' => __('Quotebox Section', 'vw-restaurant-lite'), 593 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 594 'priority' => null, 595 'panel' => 'vw_restaurant_lite_homepage_panel', 596 )); 597 598 $wp_customize->add_setting('vw_restaurant_lite_quotebox_text',array( 599 'default'=> '', 600 'sanitize_callback' => 'sanitize_text_field' 601 )); 602 $wp_customize->add_control('vw_restaurant_lite_quotebox_text',array( 603 'description' => __('<p>1. More options for quotebox section.</p> 604 <p>2. Unlimited images options.</p> 605 <p>3. Color options for quotebox section.</p>','vw-restaurant-lite'), 606 'section'=> 'vw_restaurant_lite_quotebox', 607 'type'=> 'hidden' 608 )); 609 610 $wp_customize->add_setting('vw_restaurant_lite_quotebox_btn',array( 611 'default'=> '', 612 'sanitize_callback' => 'sanitize_text_field' 613 )); 614 $wp_customize->add_control('vw_restaurant_lite_quotebox_btn',array( 615 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 616 'section'=> 'vw_restaurant_lite_quotebox', 617 'type'=> 'hidden' 618 )); 619 620 621 //choosemenu Section 622 $wp_customize->add_section('vw_restaurant_lite_choosemenu', array( 623 'title' => __('Choose menu Section', 'vw-restaurant-lite'), 624 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 625 'priority' => null, 626 'panel' => 'vw_restaurant_lite_homepage_panel', 627 )); 628 629 $wp_customize->add_setting('vw_restaurant_lite_choosemenu_text',array( 630 'default'=> '', 631 'sanitize_callback' => 'sanitize_text_field' 632 )); 633 $wp_customize->add_control('vw_restaurant_lite_choosemenu_text',array( 634 'description' => __('<p>1. More options for choose menu section.</p> 635 <p>2. Unlimited images options.</p> 636 <p>3. Color options for choose menu section.</p>','vw-restaurant-lite'), 637 'section'=> 'vw_restaurant_lite_choosemenu', 638 'type'=> 'hidden' 639 )); 640 641 $wp_customize->add_setting('vw_restaurant_lite_choosemenu_btn',array( 642 'default'=> '', 643 'sanitize_callback' => 'sanitize_text_field' 644 )); 645 $wp_customize->add_control('vw_restaurant_lite_choosemenu_btn',array( 646 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 647 'section'=> 'vw_restaurant_lite_choosemenu', 648 'type'=> 'hidden' 649 )); 650 651 652 //upcoming event Section 653 $wp_customize->add_section('vw_restaurant_lite_upcoming_event', array( 654 'title' => __('Upcoming Event Section', 'vw-restaurant-lite'), 655 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 656 'priority' => null, 657 'panel' => 'vw_restaurant_lite_homepage_panel', 658 )); 659 660 $wp_customize->add_setting('vw_restaurant_lite_upcoming_event_text',array( 661 'default'=> '', 662 'sanitize_callback' => 'sanitize_text_field' 663 )); 664 $wp_customize->add_control('vw_restaurant_lite_upcoming_event_text',array( 665 'description' => __('<p>1. More options for upcoming event section.</p> 666 <p>2. Unlimited images options.</p> 667 <p>3. Color options for upcoming event section.</p>','vw-restaurant-lite'), 668 'section'=> 'vw_restaurant_lite_upcoming_event', 669 'type'=> 'hidden' 670 )); 671 672 $wp_customize->add_setting('vw_restaurant_lite_upcoming_event_btn',array( 673 'default'=> '', 674 'sanitize_callback' => 'sanitize_text_field' 675 )); 676 $wp_customize->add_control('vw_restaurant_lite_upcoming_event_btn',array( 677 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 678 'section'=> 'vw_restaurant_lite_upcoming_event', 679 'type'=> 'hidden' 680 )); 681 682 //aboutevents Section 683 $wp_customize->add_section('vw_restaurant_lite_aboutevents', array( 684 'title' => __('About Events Section', 'vw-restaurant-lite'), 685 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 686 'priority' => null, 687 'panel' => 'vw_restaurant_lite_homepage_panel', 688 )); 689 690 $wp_customize->add_setting('vw_restaurant_lite_aboutevents_text',array( 691 'default'=> '', 692 'sanitize_callback' => 'sanitize_text_field' 693 )); 694 $wp_customize->add_control('vw_restaurant_lite_aboutevents_text',array( 695 'description' => __('<p>1. More options for about events section.</p> 696 <p>2. Unlimited images options.</p> 697 <p>3. Color options for about events section.</p>','vw-restaurant-lite'), 698 'section'=> 'vw_restaurant_lite_aboutevents', 699 'type'=> 'hidden' 700 )); 701 702 $wp_customize->add_setting('vw_restaurant_lite_aboutevents_btn',array( 703 'default'=> '', 704 'sanitize_callback' => 'sanitize_text_field' 705 )); 706 $wp_customize->add_control('vw_restaurant_lite_aboutevents_btn',array( 707 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 708 'section'=> 'vw_restaurant_lite_aboutevents', 709 'type'=> 'hidden' 710 )); 711 712 713 //Discount Coupon Section 714 $wp_customize->add_section('vw_restaurant_lite_discount_Coupon', array( 715 'title' => __('Discount Coupon Section', 'vw-restaurant-lite'), 716 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 717 'priority' => null, 718 'panel' => 'vw_restaurant_lite_homepage_panel', 719 )); 720 721 $wp_customize->add_setting('vw_restaurant_lite_discount_Coupon_text',array( 722 'default'=> '', 723 'sanitize_callback' => 'sanitize_text_field' 724 )); 725 $wp_customize->add_control('vw_restaurant_lite_discount_Coupon_text',array( 726 'description' => __('<p>1. More options for discount coupon section.</p> 727 <p>2. Unlimited images options.</p> 728 <p>3. Color options for discount coupon section.</p>','vw-restaurant-lite'), 729 'section'=> 'vw_restaurant_lite_discount_Coupon', 730 'type'=> 'hidden' 731 )); 732 733 $wp_customize->add_setting('vw_restaurant_lite_discount_Coupon_btn',array( 734 'default'=> '', 735 'sanitize_callback' => 'sanitize_text_field' 736 )); 737 $wp_customize->add_control('vw_restaurant_lite_discount_Coupon_btn',array( 738 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 739 'section'=> 'vw_restaurant_lite_discount_Coupon', 740 'type'=> 'hidden' 741 )); 742 743 //Blogpost Section 744 $wp_customize->add_section('vw_restaurant_lite_blogpost', array( 745 'title' => __('Blog post Section', 'vw-restaurant-lite'), 746 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 747 'priority' => null, 748 'panel' => 'vw_restaurant_lite_homepage_panel', 749 )); 750 751 $wp_customize->add_setting('vw_restaurant_lite_blogpost_text',array( 752 'default'=> '', 753 'sanitize_callback' => 'sanitize_text_field' 754 )); 755 $wp_customize->add_control('vw_restaurant_lite_blogpost_text',array( 756 'description' => __('<p>1. More options for blog post section.</p> 757 <p>2. Unlimited images options.</p> 758 <p>3. Color options for blog post section.</p>','vw-restaurant-lite'), 759 'section'=> 'vw_restaurant_lite_blogpost', 760 'type'=> 'hidden' 761 )); 762 763 $wp_customize->add_setting('vw_restaurant_lite_blogpost_btn',array( 764 'default'=> '', 765 'sanitize_callback' => 'sanitize_text_field' 766 )); 767 $wp_customize->add_control('vw_restaurant_lite_blogpost_btn',array( 768 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 769 'section'=> 'vw_restaurant_lite_blogpost', 770 'type'=> 'hidden' 771 )); 772 773 //contactus Section 774 $wp_customize->add_section('vw_restaurant_lite_contactus', array( 775 'title' => __('Contact us Section', 'vw-restaurant-lite'), 776 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 777 'priority' => null, 778 'panel' => 'vw_restaurant_lite_homepage_panel', 779 )); 780 781 $wp_customize->add_setting('vw_restaurant_lite_contactus_text',array( 782 'default'=> '', 783 'sanitize_callback' => 'sanitize_text_field' 784 )); 785 $wp_customize->add_control('vw_restaurant_lite_contactus_text',array( 786 'description' => __('<p>1. More options for contact us section.</p> 787 <p>2. Unlimited images options.</p> 788 <p>3. Color options for contact us section.</p>','vw-restaurant-lite'), 789 'section'=> 'vw_restaurant_lite_contactus', 790 'type'=> 'hidden' 791 )); 792 793 $wp_customize->add_setting('vw_restaurant_lite_contactus_btn',array( 794 'default'=> '', 795 'sanitize_callback' => 'sanitize_text_field' 796 )); 797 $wp_customize->add_control('vw_restaurant_lite_contactus_btn',array( 798 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 799 'section'=> 'vw_restaurant_lite_contactus', 800 'type'=> 'hidden' 801 )); 802 803 //openingtime Section 804 $wp_customize->add_section('vw_restaurant_lite_openingtime', array( 805 'title' => __('Opening time Section', 'vw-restaurant-lite'), 806 'description' => __('<p class="premium-opt">Premium Theme Features</p>','vw-restaurant-lite'), 807 'priority' => null, 808 'panel' => 'vw_restaurant_lite_homepage_panel', 809 )); 810 811 $wp_customize->add_setting('vw_restaurant_lite_openingtime_text',array( 812 'default'=> '', 813 'sanitize_callback' => 'sanitize_text_field' 814 )); 815 $wp_customize->add_control('vw_restaurant_lite_openingtime_text',array( 816 'description' => __('<p>1. More options for opening time section.</p> 817 <p>2. Unlimited images options.</p> 818 <p>3. Color options for opening time section.</p>','vw-restaurant-lite'), 819 'section'=> 'vw_restaurant_lite_openingtime', 820 'type'=> 'hidden' 821 )); 822 823 $wp_customize->add_setting('vw_restaurant_lite_openingtime_btn',array( 824 'default'=> '', 825 'sanitize_callback' => 'sanitize_text_field' 826 )); 827 $wp_customize->add_control('vw_restaurant_lite_openingtime_btn',array( 828 'description' => "<a class='go-pro' target='_blank' href='". admin_url(VW_RESTAURANT_LITE_GETSTARTED_URL) ." '>More Info</a>", 829 'section'=> 'vw_restaurant_lite_openingtime', 830 'type'=> 'hidden' 831 )); 832 833 //footer text 834 $wp_customize->add_section('vw_restaurant_lite_footer_section',array( 835 'title' => __('Footer Text','vw-restaurant-lite'), 836 'description' => "For more options of footer section </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>", 837 'panel' => 'vw_restaurant_lite_homepage_panel' 838 )); 839 840 $wp_customize->add_setting('vw_restaurant_lite_footer_background_color', array( 841 'default' => '', 842 'sanitize_callback' => 'sanitize_hex_color', 843 )); 844 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_footer_background_color', array( 845 'label' => __('Footer Background Color', 'vw-restaurant-lite'), 846 'section' => 'vw_restaurant_lite_footer_section', 847 ))); 848 849 // footer padding 850 $wp_customize->add_setting('vw_restaurant_lite_footer_padding',array( 851 'default'=> '', 852 'sanitize_callback' => 'sanitize_text_field' 853 )); 854 $wp_customize->add_control('vw_restaurant_lite_footer_padding',array( 855 'label' => __('Footer Top Bottom Padding','vw-restaurant-lite'), 856 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 857 'input_attrs' => array( 858 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 859 ), 860 'section'=> 'vw_restaurant_lite_footer_section', 861 'type'=> 'text' 862 )); 863 864 $wp_customize->add_setting('vw_restaurant_lite_footer_widgets_heading',array( 865 'default' => 'Left', 866 'transport' => 'refresh', 867 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 868 )); 869 $wp_customize->add_control('vw_restaurant_lite_footer_widgets_heading',array( 870 'type' => 'select', 871 'label' => __('Footer Widget Heading','vw-restaurant-lite'), 872 'section' => 'vw_restaurant_lite_footer_section', 873 'choices' => array( 874 'Left' => __('Left','vw-restaurant-lite'), 875 'Center' => __('Center','vw-restaurant-lite'), 876 'Right' => __('Right','vw-restaurant-lite') 877 ), 878 ) ); 879 880 $wp_customize->add_setting('vw_restaurant_lite_footer_widgets_content',array( 881 'default' => 'Left', 882 'transport' => 'refresh', 883 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 884 )); 885 $wp_customize->add_control('vw_restaurant_lite_footer_widgets_content',array( 886 'type' => 'select', 887 'label' => __('Footer Widget Content','vw-restaurant-lite'), 888 'section' => 'vw_restaurant_lite_footer_section', 889 'choices' => array( 890 'Left' => __('Left','vw-restaurant-lite'), 891 'Center' => __('Center','vw-restaurant-lite'), 892 'Right' => __('Right','vw-restaurant-lite') 893 ), 894 ) ); 895 896 //Selective Refresh 897 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_footer_copy', array( 898 'selector' => '.copyright p', 899 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_footer_copy', 900 )); 901 902 $wp_customize->add_setting('vw_restaurant_lite_footer_copy',array( 903 'default' => '', 904 'sanitize_callback' => 'sanitize_text_field' 905 )); 906 907 $wp_customize->add_control('vw_restaurant_lite_footer_copy',array( 908 'label' => __('Copyright Text','vw-restaurant-lite'), 909 'section' => 'vw_restaurant_lite_footer_section', 910 'type' => 'text' 911 )); 912 913 $wp_customize->add_setting('vw_restaurant_lite_copyright_font_size',array( 914 'default'=> '', 915 'sanitize_callback' => 'sanitize_text_field' 916 )); 917 $wp_customize->add_control('vw_restaurant_lite_copyright_font_size',array( 918 'label' => __('Copyright Font Size','vw-restaurant-lite'), 919 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 920 'input_attrs' => array( 921 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 922 ), 923 'section'=> 'vw_restaurant_lite_footer_section', 924 'type'=> 'text' 925 )); 926 927 $wp_customize->add_setting('vw_restaurant_lite_copyright_alingment',array( 928 'default' => 'center', 929 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 930 )); 931 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_copyright_alingment', array( 932 'type' => 'select', 933 'label' => __('Copyright Alignment','vw-restaurant-lite'), 934 'section' => 'vw_restaurant_lite_footer_section', 935 'settings' => 'vw_restaurant_lite_copyright_alingment', 936 'choices' => array( 937 'left' => esc_url(get_template_directory_uri()).'/images/copyright1.png', 938 'center' => esc_url(get_template_directory_uri()).'/images/copyright2.png', 939 'right' => esc_url(get_template_directory_uri()).'/images/copyright3.png' 940 )))); 941 942 $wp_customize->add_setting('vw_restaurant_lite_copyright_padding_top_bottom',array( 943 'default'=> '', 944 'sanitize_callback' => 'sanitize_text_field' 945 )); 946 $wp_customize->add_control('vw_restaurant_lite_copyright_padding_top_bottom',array( 947 'label' => __('Copyright Padding Top Bottom','vw-restaurant-lite'), 948 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 949 'input_attrs' => array( 950 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 951 ), 952 'section'=> 'vw_restaurant_lite_footer_section', 953 'type'=> 'text' 954 )); 955 956 $wp_customize->add_setting( 'vw_restaurant_lite_hide_show_scroll',array( 957 'default' => 1, 958 'transport' => 'refresh', 959 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 960 )); 961 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_hide_show_scroll',array( 962 'label' => esc_html__( 'Show / Hide Scroll To Top','vw-restaurant-lite' ), 963 'section' => 'vw_restaurant_lite_footer_section' 964 ))); 965 966 //Selective Refresh 967 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_scroll_top_icon', array( 968 'selector' => '.scrollup i', 969 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_scroll_top_icon', 970 )); 971 972 $wp_customize->add_setting('vw_restaurant_lite_scroll_top_icon',array( 973 'default' => 'fas fa-angle-up', 974 'sanitize_callback' => 'sanitize_text_field' 975 )); 976 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_scroll_top_icon',array( 977 'label' => __('Add Scroll to Top Icon','vw-restaurant-lite'), 978 'transport' => 'refresh', 979 'section' => 'vw_restaurant_lite_footer_section', 980 'setting' => 'vw_restaurant_lite_scroll_top_icon', 981 'type' => 'icon' 982 ))); 983 984 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_font_size',array( 985 'default'=> '', 986 'sanitize_callback' => 'sanitize_text_field' 987 )); 988 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_font_size',array( 989 'label' => __('Icon Font Size','vw-restaurant-lite'), 990 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 991 'input_attrs' => array( 992 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 993 ), 994 'section'=> 'vw_restaurant_lite_footer_section', 995 'type'=> 'text' 996 )); 997 998 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_padding',array( 999 'default'=> '', 1000 'sanitize_callback' => 'sanitize_text_field' 1001 )); 1002 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_padding',array( 1003 'label' => __('Icon Top Bottom Padding','vw-restaurant-lite'), 1004 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 1005 'input_attrs' => array( 1006 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 1007 ), 1008 'section'=> 'vw_restaurant_lite_footer_section', 1009 'type'=> 'text' 1010 )); 1011 1012 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_width',array( 1013 'default'=> '', 1014 'sanitize_callback' => 'sanitize_text_field' 1015 )); 1016 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_width',array( 1017 'label' => __('Icon Width','vw-restaurant-lite'), 1018 'description' => __('Enter a value in pixels Example:20px','vw-restaurant-lite'), 1019 'input_attrs' => array( 1020 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 1021 ), 1022 'section'=> 'vw_restaurant_lite_footer_section', 1023 'type'=> 'text' 1024 )); 1025 1026 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_height',array( 1027 'default'=> '', 1028 'sanitize_callback' => 'sanitize_text_field' 1029 )); 1030 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_height',array( 1031 'label' => __('Icon Height','vw-restaurant-lite'), 1032 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'), 1033 'input_attrs' => array( 1034 'placeholder' => __( '10px', 'vw-restaurant-lite' ), 1035 ), 1036 'section'=> 'vw_restaurant_lite_footer_section', 1037 'type'=> 'text' 1038 )); 1039 1040 $wp_customize->add_setting( 'vw_restaurant_lite_scroll_to_top_border_radius', array( 1041 'default' => '', 1042 'transport' => 'refresh', 1043 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range' 1044 ) ); 1045 $wp_customize->add_control( 'vw_restaurant_lite_scroll_to_top_border_radius', array( 1046 'label' => esc_html__( 'Icon Border Radius','vw-restaurant-lite' ), 1047 'section' => 'vw_restaurant_lite_footer_section', 1048 'type' => 'range', 1049 'input_attrs' => array( 1050 'step' => 1, 1051 'min' => 1, 1052 'max' => 50, 1053 ), 1054 ) ); 1055 1056 $wp_customize->add_setting('vw_restaurant_lite_scroll_top_alignment',array( 1057 'default' => 'Right', 1058 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 1059 )); 1060 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_scroll_top_alignment', array( 1061 'type' => 'select', 1062 'label' => __('Scroll To Top','vw-restaurant-lite'), 1063 'section' => 'vw_restaurant_lite_footer_section', 1064 'settings' => 'vw_restaurant_lite_scroll_top_alignment', 1065 'choices' => array( 1066 'Left' => esc_url(get_template_directory_uri()).'/images/layout1.png', 1067 'Center' => esc_url(get_template_directory_uri()).'/images/layout2.png', 1068 'Right' => esc_url(get_template_directory_uri()).'/images/layout3.png' 1069 )))); 1070 1071 $wp_customize->add_setting('vw_restaurant_lite_reset_footer_settings',array( 1072 'sanitize_callback' => 'sanitize_text_field' 1073 )); 1074 $wp_customize->add_control(new VW_Restaurant_Lite_Reset_Custom_Control($wp_customize, 'vw_restaurant_lite_reset_footer_settings',array( 1075 'type' => 'reset_control', 1076 'label' => __('Reset Footer Settings', 'vw-restaurant-lite'), 1077 'description' => 'vw_restaurant_lite_reset_all_settings', 1078 'section' => 'vw_restaurant_lite_footer_section' 1079 ))); 1080 1081 //Blog Post 1082 1083 $BlogPostParentPanel = new VW_Restaurant_Lite_WP_Customize_Panel( $wp_customize, 'blog_post_parent_panel', array( 1084 'title' => __( 'Blog Post Settings', 'vw-restaurant-lite' ), 1085 'panel' => 'vw_restaurant_lite_panel_id', 1086 )); 1087 1088 $wp_customize->add_panel( $BlogPostParentPanel ); 1089 1090 // Add example section and controls to the middle (second) panel 1091 $wp_customize->add_section( 'vw_restaurant_lite_post_settings', array( 1092 'title' => __( 'Post Settings', 'vw-restaurant-lite' ), 1093 'panel' => 'blog_post_parent_panel', 1094 )); 1095 1096 //Selective Refresh 1097 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_toggle_postdate', array( 1098 'selector' => '.services-box h2 a', 1099 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_toggle_postdate', 1100 )); 1101 1102 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_postdate',array( 1103 'default' => 1, 1104 'transport' => 'refresh', 1105 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1106 )); 1107 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_postdate',array( 1108 'label' => esc_html__( 'Post Date','vw-restaurant-lite' ), 1109 'section' => 'vw_restaurant_lite_post_settings' 1110 ))); 1111 1112 $wp_customize->add_setting( 'vw_restaurant_lite_category_hide_show',array( 1113 'default' => 1, 1114 'transport' => 'refresh', 1115 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1116 )); 1117 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_category_hide_show',array( 1118 'label' => esc_html__( 'Category','vw-restaurant-lite' ), 1119 'section' => 'vw_restaurant_lite_post_settings' 1120 ))); 1121 1122 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_hide_show',array( 1123 'default' => 1, 1124 'transport' => 'refresh', 1125 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1126 )); 1127 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_featured_image_hide_show', array( 1128 'label' => esc_html__( 'Featured Image','vw-restaurant-lite' ), 1129 'section' => 'vw_restaurant_lite_post_settings' 1130 ))); 1131 1132 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_border_radius', array( 1133 'default' => '0', 1134 'transport' => 'refresh', 1135 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range' 1136 ) ); 1137 $wp_customize->add_control( 'vw_restaurant_lite_featured_image_border_radius', array( 1138 'label' => esc_html__( 'Featured Image Border Radius','vw-restaurant-lite' ), 1139 'section' => 'vw_restaurant_lite_post_settings', 1140 'type' => 'range', 1141 'input_attrs' => array( 1142 'step' => 1, 1143 'min' => 1, 1144 'max' => 50, 1145 ), 1146 ) ); 1147 1148 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_box_shadow', array( 1149 'default' => '0', 1150 'transport' => 'refresh', 1151 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range' 1152 ) ); 1153 $wp_customize->add_control( 'vw_restaurant_lite_featured_image_box_shadow', array( 1154 'label' => esc_html__( 'Featured Image Box Shadow','vw-restaurant-lite' ), 1155 'section' => 'vw_restaurant_lite_post_settings', 1156 'type' => 'range', 1157 'input_attrs' => array( 1158 'step' => 1, 1159 'min' => 1, 1160 'max' => 50, 1161 ), 1162 ) ); 1163 1164 $wp_customize->add_setting( 'vw_restaurant_lite_excerpt_number', array( 1165 'default' => 30, 1166 'transport' => 'refresh', 1167 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range' 1168 )); 1169 $wp_customize->add_control( 'vw_restaurant_lite_excerpt_number', array( 1170 'label' => esc_html__( 'Excerpt length','vw-restaurant-lite' ), 1171 'section' => 'vw_restaurant_lite_post_settings', 1172 'type' => 'range', 1173 'settings' => 'vw_restaurant_lite_excerpt_number', 1174 'input_attrs' => array( 1175 'step' => 5, 1176 'min' => 0, 1177 'max' => 50, 1178 ), 1179 ) ); 1180 1181 //Blog layout 1182 $wp_customize->add_setting('vw_restaurant_lite_blog_layout_option',array( 1183 'default' => 'Default', 1184 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 1185 )); 1186 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_blog_layout_option', array( 1187 'type' => 'select', 1188 'label' => __('Blog Layouts','vw-restaurant-lite'), 1189 'section' => 'vw_restaurant_lite_post_settings', 1190 'choices' => array( 1191 'Default' => esc_url(get_template_directory_uri()).'/images/blog-layout1.png', 1192 'Center' => esc_url(get_template_directory_uri()).'/images/blog-layout2.png', 1193 'Left' => esc_url(get_template_directory_uri()).'/images/blog-layout3.png', 1194 )))); 1195 1196 $wp_customize->add_setting('vw_restaurant_lite_excerpt_settings',array( 1197 'default' => 'Excerpt', 1198 'transport' => 'refresh', 1199 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 1200 )); 1201 $wp_customize->add_control('vw_restaurant_lite_excerpt_settings',array( 1202 'type' => 'select', 1203 'label' => __('Post Content','vw-restaurant-lite'), 1204 'section' => 'vw_restaurant_lite_post_settings', 1205 'choices' => array( 1206 'Content' => __('Content','vw-restaurant-lite'), 1207 'Excerpt' => __('Excerpt','vw-restaurant-lite'), 1208 'No Content' => __('No Content','vw-restaurant-lite') 1209 ), 1210 ) ); 1211 1212 $wp_customize->add_setting('vw_restaurant_lite_excerpt_suffix',array( 1213 'default'=> '', 1214 'sanitize_callback' => 'sanitize_text_field' 1215 )); 1216 $wp_customize->add_control('vw_restaurant_lite_excerpt_suffix',array( 1217 'label' => __('Add Excerpt Suffix','vw-restaurant-lite'), 1218 'input_attrs' => array( 1219 'placeholder' => __( '[...]', 'vw-restaurant-lite' ), 1220 ), 1221 'section'=> 'vw_restaurant_lite_post_settings', 1222 'type'=> 'text' 1223 )); 1224 1225 $wp_customize->add_setting( 'vw_restaurant_lite_blog_pagination_hide_show',array( 1226 'default' => 1, 1227 'transport' => 'refresh', 1228 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1229 )); 1230 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_blog_pagination_hide_show',array( 1231 'label' => esc_html__( 'Show / Hide Blog Pagination','vw-restaurant-lite' ), 1232 'section' => 'vw_restaurant_lite_post_settings' 1233 ))); 1234 1235 $wp_customize->add_setting( 'vw_restaurant_lite_blog_pagination_type', array( 1236 'default' => 'blog-page-numbers', 1237 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices' 1238 )); 1239 $wp_customize->add_control( 'vw_restaurant_lite_blog_pagination_type', array( 1240 'section' => 'vw_restaurant_lite_post_settings', 1241 'type' => 'select', 1242 'label' => __( 'Blog Pagination', 'vw-restaurant-lite' ), 1243 'choices' => array( 1244 'blog-page-numbers' => __( 'Numeric', 'vw-restaurant-lite' ), 1245 'next-prev' => __( 'Older Posts/Newer Posts', 'vw-restaurant-lite' ), 1246 ))); 1247 1248 // Related Post Settings 1249 $wp_customize->add_section( 'vw_restaurant_lite_related_posts_settings', array( 1250 'title' => __( 'Related Posts Settings', 'vw-restaurant-lite' ), 1251 'panel' => 'blog_post_parent_panel', 1252 )); 1253 1254 //Selective Refresh 1255 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_related_post_title', array( 1256 'selector' => '.related-post h3', 1257 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_related_post_title', 1258 )); 1259 1260 $wp_customize->add_setting( 'vw_restaurant_lite_related_post',array( 1261 'default' => 1, 1262 'transport' => 'refresh', 1263 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1264 ) ); 1265 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_related_post',array( 1266 'label' => esc_html__( 'Related Post','vw-restaurant-lite' ), 1267 'section' => 'vw_restaurant_lite_related_posts_settings' 1268 ))); 1269 1270 $wp_customize->add_setting('vw_restaurant_lite_related_post_title',array( 1271 'default'=> '', 1272 'sanitize_callback' => 'sanitize_text_field' 1273 )); 1274 $wp_customize->add_control('vw_restaurant_lite_related_post_title',array( 1275 'label' => __('Add Related Post Title','vw-restaurant-lite'), 1276 'input_attrs' => array( 1277 'placeholder' => __( 'Related Post', 'vw-restaurant-lite' ), 1278 ), 1279 'section'=> 'vw_restaurant_lite_related_posts_settings', 1280 'type'=> 'text' 1281 )); 1282 1283 $wp_customize->add_setting('vw_restaurant_lite_related_posts_count',array( 1284 'default'=> '3', 1285 'sanitize_callback' => 'vw_restaurant_lite_sanitize_float' 1286 )); 1287 $wp_customize->add_control('vw_restaurant_lite_related_posts_count',array( 1288 'label' => __('Add Related Post Count','vw-restaurant-lite'), 1289 'input_attrs' => array( 1290 'placeholder' => __( '3', 'vw-restaurant-lite' ), 1291 ), 1292 'section'=> 'vw_restaurant_lite_related_posts_settings', 1293 'type'=> 'number' 1294 )); 1295 1296 // Single Posts Settings 1297 $wp_customize->add_section( 'vw_restaurant_lite_single_blog_settings', array( 1298 'title' => __( 'Single Post Settings', 'vw-restaurant-lite' ), 1299 'panel' => 'blog_post_parent_panel', 1300 )); 1301 1302 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_author',array( 1303 'default' => 1, 1304 'transport' => 'refresh', 1305 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1306 ) ); 1307 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_author',array( 1308 'label' => esc_html__( 'Author','vw-restaurant-lite' ), 1309 'section' => 'vw_restaurant_lite_single_blog_settings' 1310 ))); 1311 1312 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_comments',array( 1313 'default' => 1, 1314 'transport' => 'refresh', 1315 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1316 ) ); 1317 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_comments',array( 1318 'label' => esc_html__( 'Comments','vw-restaurant-lite' ), 1319 'section' => 'vw_restaurant_lite_single_blog_settings' 1320 ))); 1321 1322 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_time',array( 1323 'default' => 1, 1324 'transport' => 'refresh', 1325 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1326 ) ); 1327 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_time',array( 1328 'label' => esc_html__( 'Time','vw-restaurant-lite' ), 1329 'section' => 'vw_restaurant_lite_single_blog_settings' 1330 ))); 1331 1332 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_tags',array( 1333 'default' => 1, 1334 'transport' => 'refresh', 1335 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1336 )); 1337 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_tags', array( 1338 'label' => esc_html__( 'Tags','vw-restaurant-lite' ), 1339 'section' => 'vw_restaurant_lite_single_blog_settings' 1340 ))); 1341 1342 $wp_customize->add_setting('vw_restaurant_lite_meta_field_separator',array( 1343 'default'=> '', 1344 'sanitize_callback' => 'sanitize_text_field' 1345 )); 1346 $wp_customize->add_control('vw_restaurant_lite_meta_field_separator',array( 1347 'label' => __('Add Meta Separator','vw-restaurant-lite'), 1348 'description' => __('Add the seperator for meta box. Example: "|", "/", etc.','vw-restaurant-lite'), 1349 'section'=> 'vw_restaurant_lite_single_blog_settings', 1350 'type'=> 'text' 1351 )); 1352 1353 $wp_customize->add_setting( 'vw_restaurant_lite_single_blog_post_navigation_show_hide',array( 1354 'default' => 1, 1355 'transport' => 'refresh', 1356 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1357 )); 1358 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_single_blog_post_navigation_show_hide', array( 1359 'label' => esc_html__( 'Post Navigation','vw-restaurant-lite' ), 1360 'section' => 'vw_restaurant_lite_single_blog_settings' 1361 ))); 1362 1363 $wp_customize->add_setting( 'vw_restaurant_lite_single_post_breadcrumb',array( 1364 'default' => 1, 1365 'transport' => 'refresh', 1366 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1367 ) ); 1368 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_single_post_breadcrumb',array( 1369 'label' => esc_html__( 'Single Post Breadcrumb','vw-restaurant-lite' ), 1370 'section' => 'vw_restaurant_lite_single_blog_settings' 1371 ))); 1372 1373 //navigation text 1374 $wp_customize->add_setting('vw_restaurant_lite_single_blog_prev_navigation_text',array( 1375 'default'=> '', 1376 'sanitize_callback' => 'sanitize_text_field' 1377 )); 1378 $wp_customize->add_control('vw_restaurant_lite_single_blog_prev_navigation_text',array( 1379 'label' => __('Post Navigation Text','vw-restaurant-lite'), 1380 'input_attrs' => array( 1381 'placeholder' => __( 'PREVIOUS PAGE', 'vw-restaurant-lite' ), 1382 ), 1383 'section'=> 'vw_restaurant_lite_single_blog_settings', 1384 'type'=> 'text' 1385 )); 1386 1387 $wp_customize->add_setting('vw_restaurant_lite_single_blog_next_navigation_text',array( 1388 'default'=> '', 1389 'sanitize_callback' => 'sanitize_text_field' 1390 )); 1391 $wp_customize->add_control('vw_restaurant_lite_single_blog_next_navigation_text',array( 1392 'label' => __('Post Navigation Text','vw-restaurant-lite'), 1393 'input_attrs' => array( 1394 'placeholder' => __( 'NEXT PAGE', 'vw-restaurant-lite' ), 1395 ), 1396 'section'=> 'vw_restaurant_lite_single_blog_settings', 1397 'type'=> 'text' 1398 )); 1399 1400 $wp_customize->add_setting('vw_restaurant_lite_single_blog_comment_width',array( 1401 'default'=> '', 1402 'sanitize_callback' => 'sanitize_text_field' 1403 )); 1404 $wp_customize->add_control('vw_restaurant_lite_single_blog_comment_width',array( 1405 'label' => __('Comment Form Width','vw-restaurant-lite'), 1406 'description' => __('Enter a value in %. Example:50%','vw-restaurant-lite'), 1407 'input_attrs' => array( 1408 'placeholder' => __( '100%', 'vw-restaurant-lite' ), 1409 ), 1410 'section'=> 'vw_restaurant_lite_single_blog_settings', 1411 'type'=> 'text' 1412 )); 1413 1414 1415 // other settings 1416 $OtherParentPanel = new VW_Restaurant_Lite_WP_Customize_Panel( $wp_customize, 'vw_restaurant_lite_other_panel_id', array( 1417 'title' => __( 'Others Settings', 'vw-restaurant-lite' ), 1418 'panel' => 'vw_restaurant_lite_panel_id', 1419 )); 1420 1421 $wp_customize->add_panel( $OtherParentPanel ); 1422 44 1423 //theme Layouts 45 1424 $wp_customize->add_section( 'vw_restaurant_lite_left_right', array( 46 1425 'title' => esc_html__( 'Theme Layout Settings', 'vw-restaurant-lite' ), 47 1426 'priority' => 30, 48 'panel' => 'vw_restaurant_lite_ panel_id'1427 'panel' => 'vw_restaurant_lite_other_panel_id' 49 1428 ) ); 50 1429 … … 100 1479 ) ); 101 1480 1481 $wp_customize->add_setting( 'vw_restaurant_lite_single_page_breadcrumb',array( 1482 'default' => 1, 1483 'transport' => 'refresh', 1484 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization' 1485 ) ); 1486 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_single_page_breadcrumb',array( 1487 'label' => esc_html__( 'Single Page Breadcrumb','vw-restaurant-lite' ), 1488 'section' => 'vw_restaurant_lite_left_right' 1489 ))); 1490 102 1491 //Wow Animation 103 1492 $wp_customize->add_setting( 'vw_restaurant_lite_animation',array( … … 141 1530 ))); 142 1531 143 //Topbar section144 $wp_customize->add_section('vw_restaurant_lite_topbar_icon',array(145 'title' => __('Topbar Section','vw-restaurant-lite'),146 'description' => __('Add Top Header Content here','vw-restaurant-lite'),147 'priority' => null,148 'panel' => 'vw_restaurant_lite_panel_id',149 ));150 151 $wp_customize->add_setting( 'vw_restaurant_lite_topbar_hide_show',array(152 'default' => 0,153 'transport' => 'refresh',154 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'155 ));156 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_topbar_hide_show',array(157 'label' => esc_html__( 'Show / Hide Topbar','vw-restaurant-lite' ),158 'section' => 'vw_restaurant_lite_topbar_icon'159 )));160 161 $wp_customize->add_setting('vw_restaurant_lite_topbar_padding_top_bottom',array(162 'default'=> '',163 'sanitize_callback' => 'sanitize_text_field'164 ));165 $wp_customize->add_control('vw_restaurant_lite_topbar_padding_top_bottom',array(166 'label' => __('Topbar Padding Top Bottom','vw-restaurant-lite'),167 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),168 'input_attrs' => array(169 'placeholder' => __( '10px', 'vw-restaurant-lite' ),170 ),171 'section'=> 'vw_restaurant_lite_topbar_icon',172 'type'=> 'text'173 ));174 175 //Sticky Header176 $wp_customize->add_setting( 'vw_restaurant_lite_sticky_header',array(177 'default' => 0,178 'transport' => 'refresh',179 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'180 ) );181 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_sticky_header',array(182 'label' => esc_html__( 'Sticky Header','vw-restaurant-lite' ),183 'section' => 'vw_restaurant_lite_topbar_icon'184 )));185 186 $wp_customize->add_setting('vw_restaurant_lite_sticky_header_padding',array(187 'default'=> '',188 'sanitize_callback' => 'sanitize_text_field'189 ));190 $wp_customize->add_control('vw_restaurant_lite_sticky_header_padding',array(191 'label' => __('Sticky Header Padding','vw-restaurant-lite'),192 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),193 'input_attrs' => array(194 'placeholder' => __( '10px', 'vw-restaurant-lite' ),195 ),196 'section'=> 'vw_restaurant_lite_topbar_icon',197 'type'=> 'text'198 ));199 200 $wp_customize->add_setting('vw_restaurant_lite_navigation_menu_font_size',array(201 'default'=> '',202 'sanitize_callback' => 'sanitize_text_field'203 ));204 $wp_customize->add_control('vw_restaurant_lite_navigation_menu_font_size',array(205 'label' => __('Menus Font Size','vw-restaurant-lite'),206 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),207 'input_attrs' => array(208 'placeholder' => __( '10px', 'vw-restaurant-lite' ),209 ),210 'section'=> 'vw_restaurant_lite_topbar_icon',211 'type'=> 'text'212 ));213 214 $wp_customize->add_setting('vw_restaurant_lite_navigation_menu_font_weight',array(215 'default' => 'Default',216 'transport' => 'refresh',217 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'218 ));219 $wp_customize->add_control('vw_restaurant_lite_navigation_menu_font_weight',array(220 'type' => 'select',221 'label' => __('Menus Font Weight','vw-restaurant-lite'),222 'section' => 'vw_restaurant_lite_topbar_icon',223 'choices' => array(224 'Default' => __('Default','vw-restaurant-lite'),225 'Normal' => __('Normal','vw-restaurant-lite')226 ),227 ) );228 229 $wp_customize->add_setting('vw_restaurant_lite_header_menus_color', array(230 'default' => '',231 'sanitize_callback' => 'sanitize_hex_color',232 ));233 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_menus_color', array(234 'label' => __('Menus Color', 'vw-restaurant-lite'),235 'section' => 'vw_restaurant_lite_topbar_icon',236 )));237 238 $wp_customize->add_setting('vw_restaurant_lite_header_menus_hover_color', array(239 'default' => '',240 'sanitize_callback' => 'sanitize_hex_color',241 ));242 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_menus_hover_color', array(243 'label' => __('Menus Hover Color', 'vw-restaurant-lite'),244 'section' => 'vw_restaurant_lite_topbar_icon',245 )));246 247 $wp_customize->add_setting('vw_restaurant_lite_header_submenus_color', array(248 'default' => '',249 'sanitize_callback' => 'sanitize_hex_color',250 ));251 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_submenus_color', array(252 'label' => __('Sub Menus Color', 'vw-restaurant-lite'),253 'section' => 'vw_restaurant_lite_topbar_icon',254 )));255 256 $wp_customize->add_setting('vw_restaurant_lite_header_submenus_hover_color', array(257 'default' => '',258 'sanitize_callback' => 'sanitize_hex_color',259 ));260 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_header_submenus_hover_color', array(261 'label' => __('Sub Menus Hover Color', 'vw-restaurant-lite'),262 'section' => 'vw_restaurant_lite_topbar_icon',263 )));264 265 //Selective Refresh266 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_contact', array(267 'selector' => 'span.call',268 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_contact',269 ));270 271 $wp_customize->add_setting('vw_restaurant_lite_cont_phone_icon',array(272 'default' => 'fa fa-phone',273 'sanitize_callback' => 'sanitize_text_field'274 ));275 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_cont_phone_icon',array(276 'label' => __('Add Phone Number Icon','vw-restaurant-lite'),277 'transport' => 'refresh',278 'section' => 'vw_restaurant_lite_topbar_icon',279 'setting' => 'vw_restaurant_lite_cont_phone_icon',280 'type' => 'icon'281 )));282 283 $wp_customize->add_setting('vw_restaurant_lite_contact',array(284 'default' => '',285 'sanitize_callback' => 'vw_restaurant_lite_sanitize_phone_number'286 ));287 288 $wp_customize->add_control('vw_restaurant_lite_contact',array(289 'label' => __('Add Phone Number','vw-restaurant-lite'),290 'section' => 'vw_restaurant_lite_topbar_icon',291 'setting' => 'vw_restaurant_lite_contact',292 'type' => 'text'293 ));294 295 $wp_customize->add_setting('vw_restaurant_lite_cont_email_icon',array(296 'default' => 'fa fa-envelope',297 'sanitize_callback' => 'sanitize_text_field'298 ));299 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_cont_email_icon',array(300 'label' => __('Add Email Icon','vw-restaurant-lite'),301 'transport' => 'refresh',302 'section' => 'vw_restaurant_lite_topbar_icon',303 'setting' => 'vw_restaurant_lite_cont_email_icon',304 'type' => 'icon'305 )));306 307 $wp_customize->add_setting('vw_restaurant_lite_email',array(308 'default' => '',309 'sanitize_callback' => 'sanitize_email'310 ));311 312 $wp_customize->add_control('vw_restaurant_lite_email',array(313 'label' => __('Add Email','vw-restaurant-lite'),314 'section' => 'vw_restaurant_lite_topbar_icon',315 'setting' => 'vw_restaurant_lite_email',316 'type' => 'text'317 ));318 319 //home page slider320 $wp_customize->add_section( 'vw_restaurant_lite_slidersettings' , array(321 'title' => __( 'Slider Settings', 'vw-restaurant-lite' ),322 'description' => "Free theme has 3 slides options, For unlimited slides and more options </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>",323 'priority' => null,324 'panel' => 'vw_restaurant_lite_panel_id'325 ) );326 327 $wp_customize->add_setting( 'vw_restaurant_lite_slider_hide_show',array(328 'default' => 0,329 'transport' => 'refresh',330 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'331 ));332 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_slider_hide_show',array(333 'label' => esc_html__( 'Show / Hide Slider','vw-restaurant-lite' ),334 'section' => 'vw_restaurant_lite_slidersettings'335 )));336 337 //Selective Refresh338 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_slider_hide_show',array(339 'selector' => '.slider .inner_carousel h1',340 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_slider_hide_show',341 ));342 343 for ( $count = 1; $count <= 3; $count++ ) {344 // Add color scheme setting and control.345 $wp_customize->add_setting( 'vw_restaurant_lite_slider_page' . $count, array(346 'default' => '',347 'sanitize_callback' => 'vw_restaurant_lite_sanitize_dropdown_pages'348 ) );349 $wp_customize->add_control( 'vw_restaurant_lite_slider_page' . $count, array(350 'label' => __( 'Select Slide Image Page', 'vw-restaurant-lite' ),351 'description' => __('Slider image size (1284 x 546)','vw-restaurant-lite'),352 'section' => 'vw_restaurant_lite_slidersettings',353 'type' => 'dropdown-pages'354 ) );355 }356 357 $wp_customize->add_setting('vw_restaurant_lite_slider_button_text',array(358 'default'=> '',359 'sanitize_callback' => 'sanitize_text_field'360 ));361 $wp_customize->add_control('vw_restaurant_lite_slider_button_text',array(362 'label' => __('Add Slider Button Text','vw-restaurant-lite'),363 'input_attrs' => array(364 'placeholder' => __( 'READ MORE', 'vw-restaurant-lite' ),365 ),366 'section'=> 'vw_restaurant_lite_slidersettings',367 'type'=> 'text'368 ));369 370 //content layout371 $wp_customize->add_setting('vw_restaurant_lite_slider_content_option',array(372 'default' => 'Center',373 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'374 ));375 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_slider_content_option', array(376 'type' => 'select',377 'label' => __('Slider Content Layouts','vw-restaurant-lite'),378 'section' => 'vw_restaurant_lite_slidersettings',379 'choices' => array(380 'Left' => esc_url(get_template_directory_uri()).'/images/slider-content1.png',381 'Center' => esc_url(get_template_directory_uri()).'/images/slider-content2.png',382 'Right' => esc_url(get_template_directory_uri()).'/images/slider-content3.png',383 ))));384 385 //Slider content padding386 $wp_customize->add_setting('vw_restaurant_lite_slider_content_padding_top_bottom',array(387 'default'=> '',388 'sanitize_callback' => 'sanitize_text_field'389 ));390 $wp_customize->add_control('vw_restaurant_lite_slider_content_padding_top_bottom',array(391 'label' => __('Slider Content Padding Top Bottom','vw-restaurant-lite'),392 'description' => __('Enter a value in %. Example:20%','vw-restaurant-lite'),393 'input_attrs' => array(394 'placeholder' => __( '50%', 'vw-restaurant-lite' ),395 ),396 'section'=> 'vw_restaurant_lite_slidersettings',397 'type'=> 'text'398 ));399 400 $wp_customize->add_setting('vw_restaurant_lite_slider_content_padding_left_right',array(401 'default'=> '',402 'sanitize_callback' => 'sanitize_text_field'403 ));404 $wp_customize->add_control('vw_restaurant_lite_slider_content_padding_left_right',array(405 'label' => __('Slider Content Padding Left Right','vw-restaurant-lite'),406 'description' => __('Enter a value in %. Example:20%','vw-restaurant-lite'),407 'input_attrs' => array(408 'placeholder' => __( '50%', 'vw-restaurant-lite' ),409 ),410 'section'=> 'vw_restaurant_lite_slidersettings',411 'type'=> 'text'412 ));413 414 //Slider excerpt415 $wp_customize->add_setting( 'vw_restaurant_lite_slider_excerpt_number', array(416 'default' => 30,417 'transport' => 'refresh',418 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range'419 ) );420 $wp_customize->add_control( 'vw_restaurant_lite_slider_excerpt_number', array(421 'label' => esc_html__( 'Slider Excerpt length','vw-restaurant-lite' ),422 'section' => 'vw_restaurant_lite_slidersettings',423 'type' => 'range',424 'settings' => 'vw_restaurant_lite_slider_excerpt_number',425 'input_attrs' => array(426 'step' => 5,427 'min' => 0,428 'max' => 50,429 ),430 ) );431 432 //Opacity433 $wp_customize->add_setting('vw_restaurant_lite_slider_opacity_color',array(434 'default' => 0.5,435 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'436 ));437 438 $wp_customize->add_control( 'vw_restaurant_lite_slider_opacity_color', array(439 'label' => esc_html__( 'Slider Image Opacity','vw-restaurant-lite' ),440 'section' => 'vw_restaurant_lite_slidersettings',441 'type' => 'select',442 'settings' => 'vw_restaurant_lite_slider_opacity_color',443 'choices' => array(444 '0' => esc_attr('0','vw-restaurant-lite'),445 '0.1' => esc_attr('0.1','vw-restaurant-lite'),446 '0.2' => esc_attr('0.2','vw-restaurant-lite'),447 '0.3' => esc_attr('0.3','vw-restaurant-lite'),448 '0.4' => esc_attr('0.4','vw-restaurant-lite'),449 '0.5' => esc_attr('0.5','vw-restaurant-lite'),450 '0.6' => esc_attr('0.6','vw-restaurant-lite'),451 '0.7' => esc_attr('0.7','vw-restaurant-lite'),452 '0.8' => esc_attr('0.8','vw-restaurant-lite'),453 '0.9' => esc_attr('0.9','vw-restaurant-lite')454 ),455 ));456 457 //Slider height458 $wp_customize->add_setting('vw_restaurant_lite_slider_height',array(459 'default'=> '',460 'sanitize_callback' => 'sanitize_text_field'461 ));462 $wp_customize->add_control('vw_restaurant_lite_slider_height',array(463 'label' => __('Slider Height','vw-restaurant-lite'),464 'description' => __('Specify the slider height (px).','vw-restaurant-lite'),465 'input_attrs' => array(466 'placeholder' => __( '500px', 'vw-restaurant-lite' ),467 ),468 'section'=> 'vw_restaurant_lite_slidersettings',469 'type'=> 'text'470 ));471 472 $wp_customize->add_setting( 'vw_restaurant_lite_slider_speed', array(473 'default' => 4000,474 'sanitize_callback' => 'vw_restaurant_lite_sanitize_float'475 ) );476 $wp_customize->add_control( 'vw_restaurant_lite_slider_speed', array(477 'label' => esc_html__('Slider Transition Speed','vw-restaurant-lite'),478 'section' => 'vw_restaurant_lite_slidersettings',479 'type' => 'number',480 ) );481 482 //we Believe483 $wp_customize->add_section('vw_restaurant_lite_belive',array(484 'title' => __('We Believe Section','vw-restaurant-lite'),485 'description' => "For more options of believe section </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>",486 'panel' => 'vw_restaurant_lite_panel_id',487 ));488 489 //Selective Refresh490 $wp_customize->selective_refresh->add_partial( 'vw_restaurant_lite_belive_post_setting', array(491 'selector' => '.we_belive a.button',492 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_belive_post_setting',493 ));494 495 $args = array('numberposts' => -1);496 $post_list = get_posts($args);497 $posts[]='Select';498 foreach($post_list as $post){499 $posts[$post->post_title] = $post->post_title;500 }501 502 $wp_customize->add_setting('vw_restaurant_lite_belive_post_setting',array(503 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices',504 ));505 $wp_customize->add_control('vw_restaurant_lite_belive_post_setting',array(506 'type' => 'select',507 'choices' => $posts,508 'label' => __('Select post','vw-restaurant-lite'),509 'section' => 'vw_restaurant_lite_belive',510 ));511 512 $wp_customize->add_setting('vw_restaurant_lite_about_button_text',array(513 'default'=> '',514 'sanitize_callback' => 'sanitize_text_field'515 ));516 $wp_customize->add_control('vw_restaurant_lite_about_button_text',array(517 'label' => __('Add About Button Text','vw-restaurant-lite'),518 'input_attrs' => array(519 'placeholder' => __( 'ABOUT US', 'vw-restaurant-lite' ),520 ),521 'section'=> 'vw_restaurant_lite_belive',522 'type'=> 'text'523 ));524 525 //Blog Post526 $wp_customize->add_panel( $VWRestaurantLiteParentPanel );527 528 $BlogPostParentPanel = new VW_Restaurant_Lite_WP_Customize_Panel( $wp_customize, 'blog_post_parent_panel', array(529 'title' => __( 'Blog Post Settings', 'vw-restaurant-lite' ),530 'panel' => 'vw_restaurant_lite_panel_id',531 ));532 533 $wp_customize->add_panel( $BlogPostParentPanel );534 535 // Add example section and controls to the middle (second) panel536 $wp_customize->add_section( 'vw_restaurant_lite_post_settings', array(537 'title' => __( 'Post Settings', 'vw-restaurant-lite' ),538 'panel' => 'blog_post_parent_panel',539 ));540 541 //Selective Refresh542 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_toggle_postdate', array(543 'selector' => '.services-box h2 a',544 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_toggle_postdate',545 ));546 547 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_postdate',array(548 'default' => 1,549 'transport' => 'refresh',550 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'551 ));552 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_postdate',array(553 'label' => esc_html__( 'Post Date','vw-restaurant-lite' ),554 'section' => 'vw_restaurant_lite_post_settings'555 )));556 557 $wp_customize->add_setting( 'vw_restaurant_lite_category_hide_show',array(558 'default' => 1,559 'transport' => 'refresh',560 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'561 ));562 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_category_hide_show',array(563 'label' => esc_html__( 'Category','vw-restaurant-lite' ),564 'section' => 'vw_restaurant_lite_post_settings'565 )));566 567 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_hide_show',array(568 'default' => 1,569 'transport' => 'refresh',570 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'571 ));572 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_featured_image_hide_show', array(573 'label' => esc_html__( 'Featured Image','vw-restaurant-lite' ),574 'section' => 'vw_restaurant_lite_post_settings'575 )));576 577 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_border_radius', array(578 'default' => '0',579 'transport' => 'refresh',580 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range'581 ) );582 $wp_customize->add_control( 'vw_restaurant_lite_featured_image_border_radius', array(583 'label' => esc_html__( 'Featured Image Border Radius','vw-restaurant-lite' ),584 'section' => 'vw_restaurant_lite_post_settings',585 'type' => 'range',586 'input_attrs' => array(587 'step' => 1,588 'min' => 1,589 'max' => 50,590 ),591 ) );592 593 $wp_customize->add_setting( 'vw_restaurant_lite_featured_image_box_shadow', array(594 'default' => '0',595 'transport' => 'refresh',596 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range'597 ) );598 $wp_customize->add_control( 'vw_restaurant_lite_featured_image_box_shadow', array(599 'label' => esc_html__( 'Featured Image Box Shadow','vw-restaurant-lite' ),600 'section' => 'vw_restaurant_lite_post_settings',601 'type' => 'range',602 'input_attrs' => array(603 'step' => 1,604 'min' => 1,605 'max' => 50,606 ),607 ) );608 609 $wp_customize->add_setting( 'vw_restaurant_lite_excerpt_number', array(610 'default' => 30,611 'transport' => 'refresh',612 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range'613 ));614 $wp_customize->add_control( 'vw_restaurant_lite_excerpt_number', array(615 'label' => esc_html__( 'Excerpt length','vw-restaurant-lite' ),616 'section' => 'vw_restaurant_lite_post_settings',617 'type' => 'range',618 'settings' => 'vw_restaurant_lite_excerpt_number',619 'input_attrs' => array(620 'step' => 5,621 'min' => 0,622 'max' => 50,623 ),624 ) );625 626 //Blog layout627 $wp_customize->add_setting('vw_restaurant_lite_blog_layout_option',array(628 'default' => 'Default',629 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'630 ));631 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_blog_layout_option', array(632 'type' => 'select',633 'label' => __('Blog Layouts','vw-restaurant-lite'),634 'section' => 'vw_restaurant_lite_post_settings',635 'choices' => array(636 'Default' => esc_url(get_template_directory_uri()).'/images/blog-layout1.png',637 'Center' => esc_url(get_template_directory_uri()).'/images/blog-layout2.png',638 'Left' => esc_url(get_template_directory_uri()).'/images/blog-layout3.png',639 ))));640 641 $wp_customize->add_setting('vw_restaurant_lite_excerpt_settings',array(642 'default' => 'Excerpt',643 'transport' => 'refresh',644 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'645 ));646 $wp_customize->add_control('vw_restaurant_lite_excerpt_settings',array(647 'type' => 'select',648 'label' => __('Post Content','vw-restaurant-lite'),649 'section' => 'vw_restaurant_lite_post_settings',650 'choices' => array(651 'Content' => __('Content','vw-restaurant-lite'),652 'Excerpt' => __('Excerpt','vw-restaurant-lite'),653 'No Content' => __('No Content','vw-restaurant-lite')654 ),655 ) );656 657 $wp_customize->add_setting('vw_restaurant_lite_excerpt_suffix',array(658 'default'=> '',659 'sanitize_callback' => 'sanitize_text_field'660 ));661 $wp_customize->add_control('vw_restaurant_lite_excerpt_suffix',array(662 'label' => __('Add Excerpt Suffix','vw-restaurant-lite'),663 'input_attrs' => array(664 'placeholder' => __( '[...]', 'vw-restaurant-lite' ),665 ),666 'section'=> 'vw_restaurant_lite_post_settings',667 'type'=> 'text'668 ));669 670 $wp_customize->add_setting( 'vw_restaurant_lite_blog_pagination_hide_show',array(671 'default' => 1,672 'transport' => 'refresh',673 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'674 ));675 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_blog_pagination_hide_show',array(676 'label' => esc_html__( 'Show / Hide Blog Pagination','vw-restaurant-lite' ),677 'section' => 'vw_restaurant_lite_post_settings'678 )));679 680 $wp_customize->add_setting( 'vw_restaurant_lite_blog_pagination_type', array(681 'default' => 'blog-page-numbers',682 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'683 ));684 $wp_customize->add_control( 'vw_restaurant_lite_blog_pagination_type', array(685 'section' => 'vw_restaurant_lite_post_settings',686 'type' => 'select',687 'label' => __( 'Blog Pagination', 'vw-restaurant-lite' ),688 'choices' => array(689 'blog-page-numbers' => __( 'Numeric', 'vw-restaurant-lite' ),690 'next-prev' => __( 'Older Posts/Newer Posts', 'vw-restaurant-lite' ),691 )));692 693 // Related Post Settings694 $wp_customize->add_section( 'vw_restaurant_lite_related_posts_settings', array(695 'title' => __( 'Related Posts Settings', 'vw-restaurant-lite' ),696 'panel' => 'blog_post_parent_panel',697 ));698 699 //Selective Refresh700 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_related_post_title', array(701 'selector' => '.related-post h3',702 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_related_post_title',703 ));704 705 $wp_customize->add_setting( 'vw_restaurant_lite_related_post',array(706 'default' => 1,707 'transport' => 'refresh',708 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'709 ) );710 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_related_post',array(711 'label' => esc_html__( 'Related Post','vw-restaurant-lite' ),712 'section' => 'vw_restaurant_lite_related_posts_settings'713 )));714 715 $wp_customize->add_setting('vw_restaurant_lite_related_post_title',array(716 'default'=> '',717 'sanitize_callback' => 'sanitize_text_field'718 ));719 $wp_customize->add_control('vw_restaurant_lite_related_post_title',array(720 'label' => __('Add Related Post Title','vw-restaurant-lite'),721 'input_attrs' => array(722 'placeholder' => __( 'Related Post', 'vw-restaurant-lite' ),723 ),724 'section'=> 'vw_restaurant_lite_related_posts_settings',725 'type'=> 'text'726 ));727 728 $wp_customize->add_setting('vw_restaurant_lite_related_posts_count',array(729 'default'=> '3',730 'sanitize_callback' => 'vw_restaurant_lite_sanitize_float'731 ));732 $wp_customize->add_control('vw_restaurant_lite_related_posts_count',array(733 'label' => __('Add Related Post Count','vw-restaurant-lite'),734 'input_attrs' => array(735 'placeholder' => __( '3', 'vw-restaurant-lite' ),736 ),737 'section'=> 'vw_restaurant_lite_related_posts_settings',738 'type'=> 'number'739 ));740 741 // Single Posts Settings742 $wp_customize->add_section( 'vw_restaurant_lite_single_blog_settings', array(743 'title' => __( 'Single Post Settings', 'vw-restaurant-lite' ),744 'panel' => 'blog_post_parent_panel',745 ));746 747 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_author',array(748 'default' => 1,749 'transport' => 'refresh',750 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'751 ) );752 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_author',array(753 'label' => esc_html__( 'Author','vw-restaurant-lite' ),754 'section' => 'vw_restaurant_lite_single_blog_settings'755 )));756 757 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_comments',array(758 'default' => 1,759 'transport' => 'refresh',760 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'761 ) );762 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_comments',array(763 'label' => esc_html__( 'Comments','vw-restaurant-lite' ),764 'section' => 'vw_restaurant_lite_single_blog_settings'765 )));766 767 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_time',array(768 'default' => 1,769 'transport' => 'refresh',770 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'771 ) );772 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_time',array(773 'label' => esc_html__( 'Time','vw-restaurant-lite' ),774 'section' => 'vw_restaurant_lite_single_blog_settings'775 )));776 777 $wp_customize->add_setting( 'vw_restaurant_lite_toggle_tags',array(778 'default' => 1,779 'transport' => 'refresh',780 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'781 ));782 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_toggle_tags', array(783 'label' => esc_html__( 'Tags','vw-restaurant-lite' ),784 'section' => 'vw_restaurant_lite_single_blog_settings'785 )));786 787 $wp_customize->add_setting('vw_restaurant_lite_meta_field_separator',array(788 'default'=> '',789 'sanitize_callback' => 'sanitize_text_field'790 ));791 $wp_customize->add_control('vw_restaurant_lite_meta_field_separator',array(792 'label' => __('Add Meta Separator','vw-restaurant-lite'),793 'description' => __('Add the seperator for meta box. Example: "|", "/", etc.','vw-restaurant-lite'),794 'section'=> 'vw_restaurant_lite_single_blog_settings',795 'type'=> 'text'796 ));797 798 $wp_customize->add_setting( 'vw_restaurant_lite_single_blog_post_navigation_show_hide',array(799 'default' => 1,800 'transport' => 'refresh',801 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'802 ));803 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_single_blog_post_navigation_show_hide', array(804 'label' => esc_html__( 'Post Navigation','vw-restaurant-lite' ),805 'section' => 'vw_restaurant_lite_single_blog_settings'806 )));807 808 //navigation text809 $wp_customize->add_setting('vw_restaurant_lite_single_blog_prev_navigation_text',array(810 'default'=> '',811 'sanitize_callback' => 'sanitize_text_field'812 ));813 $wp_customize->add_control('vw_restaurant_lite_single_blog_prev_navigation_text',array(814 'label' => __('Post Navigation Text','vw-restaurant-lite'),815 'input_attrs' => array(816 'placeholder' => __( 'PREVIOUS PAGE', 'vw-restaurant-lite' ),817 ),818 'section'=> 'vw_restaurant_lite_single_blog_settings',819 'type'=> 'text'820 ));821 822 $wp_customize->add_setting('vw_restaurant_lite_single_blog_next_navigation_text',array(823 'default'=> '',824 'sanitize_callback' => 'sanitize_text_field'825 ));826 $wp_customize->add_control('vw_restaurant_lite_single_blog_next_navigation_text',array(827 'label' => __('Post Navigation Text','vw-restaurant-lite'),828 'input_attrs' => array(829 'placeholder' => __( 'NEXT PAGE', 'vw-restaurant-lite' ),830 ),831 'section'=> 'vw_restaurant_lite_single_blog_settings',832 'type'=> 'text'833 ));834 835 $wp_customize->add_setting('vw_restaurant_lite_single_blog_comment_width',array(836 'default'=> '',837 'sanitize_callback' => 'sanitize_text_field'838 ));839 $wp_customize->add_control('vw_restaurant_lite_single_blog_comment_width',array(840 'label' => __('Comment Form Width','vw-restaurant-lite'),841 'description' => __('Enter a value in %. Example:50%','vw-restaurant-lite'),842 'input_attrs' => array(843 'placeholder' => __( '100%', 'vw-restaurant-lite' ),844 ),845 'section'=> 'vw_restaurant_lite_single_blog_settings',846 'type'=> 'text'847 ));848 849 1532 //404 Page Setting 850 1533 $wp_customize->add_section('vw_restaurant_lite_404_page',array( 851 1534 'title' => __('404 Page Settings','vw-restaurant-lite'), 852 'panel' => 'vw_restaurant_lite_ panel_id',1535 'panel' => 'vw_restaurant_lite_other_panel_id', 853 1536 )); 854 1537 … … 897 1580 $wp_customize->add_section('vw_restaurant_lite_no_results_page',array( 898 1581 'title' => __('No Results Page Settings','vw-restaurant-lite'), 899 'panel' => 'vw_restaurant_lite_ panel_id',1582 'panel' => 'vw_restaurant_lite_other_panel_id', 900 1583 )); 901 1584 … … 931 1614 $wp_customize->add_section('vw_restaurant_lite_social_icon_settings',array( 932 1615 'title' => __('Social Icons Settings','vw-restaurant-lite'), 933 'panel' => 'vw_restaurant_lite_ panel_id',1616 'panel' => 'vw_restaurant_lite_other_panel_id', 934 1617 )); 935 1618 … … 1009 1692 $wp_customize->add_section('vw_restaurant_lite_responsive_media',array( 1010 1693 'title' => __('Responsive Media','vw-restaurant-lite'), 1011 'panel' => 'vw_restaurant_lite_ panel_id',1694 'panel' => 'vw_restaurant_lite_other_panel_id', 1012 1695 )); 1013 1696 … … 1093 1776 'setting' => 'vw_restaurant_lite_res_close_menu_icon', 1094 1777 'type' => 'icon' 1095 )));1096 1097 //footer text1098 $wp_customize->add_section('vw_restaurant_lite_footer_section',array(1099 'title' => __('Footer Text','vw-restaurant-lite'),1100 'description' => "For more options of footer section </br><a class='go-pro-btn' target='_blank' href='". esc_url(VW_RESTAURANT_LITE_GO_PRO) ." '>GO PRO</a>",1101 'panel' => 'vw_restaurant_lite_panel_id'1102 ));1103 1104 $wp_customize->add_setting('vw_restaurant_lite_footer_background_color', array(1105 'default' => '',1106 'sanitize_callback' => 'sanitize_hex_color',1107 ));1108 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'vw_restaurant_lite_footer_background_color', array(1109 'label' => __('Footer Background Color', 'vw-restaurant-lite'),1110 'section' => 'vw_restaurant_lite_footer_section',1111 )));1112 1113 $wp_customize->add_setting('vw_restaurant_lite_footer_widgets_heading',array(1114 'default' => 'Left',1115 'transport' => 'refresh',1116 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'1117 ));1118 $wp_customize->add_control('vw_restaurant_lite_footer_widgets_heading',array(1119 'type' => 'select',1120 'label' => __('Footer Widget Heading','vw-restaurant-lite'),1121 'section' => 'vw_restaurant_lite_footer_section',1122 'choices' => array(1123 'Left' => __('Left','vw-restaurant-lite'),1124 'Center' => __('Center','vw-restaurant-lite'),1125 'Right' => __('Right','vw-restaurant-lite')1126 ),1127 ) );1128 1129 $wp_customize->add_setting('vw_restaurant_lite_footer_widgets_content',array(1130 'default' => 'Left',1131 'transport' => 'refresh',1132 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'1133 ));1134 $wp_customize->add_control('vw_restaurant_lite_footer_widgets_content',array(1135 'type' => 'select',1136 'label' => __('Footer Widget Content','vw-restaurant-lite'),1137 'section' => 'vw_restaurant_lite_footer_section',1138 'choices' => array(1139 'Left' => __('Left','vw-restaurant-lite'),1140 'Center' => __('Center','vw-restaurant-lite'),1141 'Right' => __('Right','vw-restaurant-lite')1142 ),1143 ) );1144 1145 //Selective Refresh1146 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_footer_copy', array(1147 'selector' => '.copyright p',1148 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_footer_copy',1149 ));1150 1151 $wp_customize->add_setting('vw_restaurant_lite_footer_copy',array(1152 'default' => '',1153 'sanitize_callback' => 'sanitize_text_field'1154 ));1155 1156 $wp_customize->add_control('vw_restaurant_lite_footer_copy',array(1157 'label' => __('Copyright Text','vw-restaurant-lite'),1158 'section' => 'vw_restaurant_lite_footer_section',1159 'type' => 'text'1160 ));1161 1162 $wp_customize->add_setting('vw_restaurant_lite_copyright_font_size',array(1163 'default'=> '',1164 'sanitize_callback' => 'sanitize_text_field'1165 ));1166 $wp_customize->add_control('vw_restaurant_lite_copyright_font_size',array(1167 'label' => __('Copyright Font Size','vw-restaurant-lite'),1168 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),1169 'input_attrs' => array(1170 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1171 ),1172 'section'=> 'vw_restaurant_lite_footer_section',1173 'type'=> 'text'1174 ));1175 1176 $wp_customize->add_setting('vw_restaurant_lite_copyright_alingment',array(1177 'default' => 'center',1178 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'1179 ));1180 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_copyright_alingment', array(1181 'type' => 'select',1182 'label' => __('Copyright Alignment','vw-restaurant-lite'),1183 'section' => 'vw_restaurant_lite_footer_section',1184 'settings' => 'vw_restaurant_lite_copyright_alingment',1185 'choices' => array(1186 'left' => esc_url(get_template_directory_uri()).'/images/copyright1.png',1187 'center' => esc_url(get_template_directory_uri()).'/images/copyright2.png',1188 'right' => esc_url(get_template_directory_uri()).'/images/copyright3.png'1189 ))));1190 1191 $wp_customize->add_setting('vw_restaurant_lite_copyright_padding_top_bottom',array(1192 'default'=> '',1193 'sanitize_callback' => 'sanitize_text_field'1194 ));1195 $wp_customize->add_control('vw_restaurant_lite_copyright_padding_top_bottom',array(1196 'label' => __('Copyright Padding Top Bottom','vw-restaurant-lite'),1197 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),1198 'input_attrs' => array(1199 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1200 ),1201 'section'=> 'vw_restaurant_lite_footer_section',1202 'type'=> 'text'1203 ));1204 1205 $wp_customize->add_setting( 'vw_restaurant_lite_hide_show_scroll',array(1206 'default' => 1,1207 'transport' => 'refresh',1208 'sanitize_callback' => 'vw_restaurant_lite_switch_sanitization'1209 ));1210 $wp_customize->add_control( new VW_Restaurant_Lite_Toggle_Switch_Custom_Control( $wp_customize, 'vw_restaurant_lite_hide_show_scroll',array(1211 'label' => esc_html__( 'Show / Hide Scroll To Top','vw-restaurant-lite' ),1212 'section' => 'vw_restaurant_lite_footer_section'1213 )));1214 1215 //Selective Refresh1216 $wp_customize->selective_refresh->add_partial('vw_restaurant_lite_scroll_top_icon', array(1217 'selector' => '.scrollup i',1218 'render_callback' => 'vw_restaurant_lite_customize_partial_vw_restaurant_lite_scroll_top_icon',1219 ));1220 1221 $wp_customize->add_setting('vw_restaurant_lite_scroll_top_icon',array(1222 'default' => 'fas fa-angle-up',1223 'sanitize_callback' => 'sanitize_text_field'1224 ));1225 $wp_customize->add_control(new VW_Restaurant_Lite_Fontawesome_Icon_Chooser($wp_customize,'vw_restaurant_lite_scroll_top_icon',array(1226 'label' => __('Add Scroll to Top Icon','vw-restaurant-lite'),1227 'transport' => 'refresh',1228 'section' => 'vw_restaurant_lite_footer_section',1229 'setting' => 'vw_restaurant_lite_scroll_top_icon',1230 'type' => 'icon'1231 )));1232 1233 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_font_size',array(1234 'default'=> '',1235 'sanitize_callback' => 'sanitize_text_field'1236 ));1237 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_font_size',array(1238 'label' => __('Icon Font Size','vw-restaurant-lite'),1239 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),1240 'input_attrs' => array(1241 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1242 ),1243 'section'=> 'vw_restaurant_lite_footer_section',1244 'type'=> 'text'1245 ));1246 1247 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_padding',array(1248 'default'=> '',1249 'sanitize_callback' => 'sanitize_text_field'1250 ));1251 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_padding',array(1252 'label' => __('Icon Top Bottom Padding','vw-restaurant-lite'),1253 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),1254 'input_attrs' => array(1255 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1256 ),1257 'section'=> 'vw_restaurant_lite_footer_section',1258 'type'=> 'text'1259 ));1260 1261 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_width',array(1262 'default'=> '',1263 'sanitize_callback' => 'sanitize_text_field'1264 ));1265 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_width',array(1266 'label' => __('Icon Width','vw-restaurant-lite'),1267 'description' => __('Enter a value in pixels Example:20px','vw-restaurant-lite'),1268 'input_attrs' => array(1269 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1270 ),1271 'section'=> 'vw_restaurant_lite_footer_section',1272 'type'=> 'text'1273 ));1274 1275 $wp_customize->add_setting('vw_restaurant_lite_scroll_to_top_height',array(1276 'default'=> '',1277 'sanitize_callback' => 'sanitize_text_field'1278 ));1279 $wp_customize->add_control('vw_restaurant_lite_scroll_to_top_height',array(1280 'label' => __('Icon Height','vw-restaurant-lite'),1281 'description' => __('Enter a value in pixels. Example:20px','vw-restaurant-lite'),1282 'input_attrs' => array(1283 'placeholder' => __( '10px', 'vw-restaurant-lite' ),1284 ),1285 'section'=> 'vw_restaurant_lite_footer_section',1286 'type'=> 'text'1287 ));1288 1289 $wp_customize->add_setting( 'vw_restaurant_lite_scroll_to_top_border_radius', array(1290 'default' => '',1291 'transport' => 'refresh',1292 'sanitize_callback' => 'vw_restaurant_lite_sanitize_number_range'1293 ) );1294 $wp_customize->add_control( 'vw_restaurant_lite_scroll_to_top_border_radius', array(1295 'label' => esc_html__( 'Icon Border Radius','vw-restaurant-lite' ),1296 'section' => 'vw_restaurant_lite_footer_section',1297 'type' => 'range',1298 'input_attrs' => array(1299 'step' => 1,1300 'min' => 1,1301 'max' => 50,1302 ),1303 ) );1304 1305 $wp_customize->add_setting('vw_restaurant_lite_scroll_top_alignment',array(1306 'default' => 'Right',1307 'sanitize_callback' => 'vw_restaurant_lite_sanitize_choices'1308 ));1309 $wp_customize->add_control(new VW_Restaurant_Lite_Image_Radio_Control($wp_customize, 'vw_restaurant_lite_scroll_top_alignment', array(1310 'type' => 'select',1311 'label' => __('Scroll To Top','vw-restaurant-lite'),1312 'section' => 'vw_restaurant_lite_footer_section',1313 'settings' => 'vw_restaurant_lite_scroll_top_alignment',1314 'choices' => array(1315 'Left' => esc_url(get_template_directory_uri()).'/images/layout1.png',1316 'Center' => esc_url(get_template_directory_uri()).'/images/layout2.png',1317 'Right' => esc_url(get_template_directory_uri()).'/images/layout3.png'1318 ))));1319 1320 $wp_customize->add_setting('vw_restaurant_lite_reset_footer_settings',array(1321 'sanitize_callback' => 'sanitize_text_field'1322 ));1323 $wp_customize->add_control(new VW_Restaurant_Lite_Reset_Custom_Control($wp_customize, 'vw_restaurant_lite_reset_footer_settings',array(1324 'type' => 'reset_control',1325 'label' => __('Reset Footer Settings', 'vw-restaurant-lite'),1326 'description' => 'vw_restaurant_lite_reset_all_settings',1327 'section' => 'vw_restaurant_lite_footer_section'1328 1778 ))); 1329 1779 -
vw-restaurant-lite/1.8.4/inline-style.php
r178040 r178958 421 421 } 422 422 423 $vw_restaurant_lite_footer_padding = get_theme_mod('vw_restaurant_lite_footer_padding'); 424 if($vw_restaurant_lite_footer_padding != false){ 425 $vw_restaurant_lite_custom_css .='.footer{'; 426 $vw_restaurant_lite_custom_css .='padding: '.esc_attr($vw_restaurant_lite_footer_padding).' 0;'; 427 $vw_restaurant_lite_custom_css .='}'; 428 } 429 423 430 /*----------------Sroll to top Settings ------------------*/ 424 431 -
vw-restaurant-lite/1.8.4/languages/vw-restaurant-lite.pot
r178040 r178958 577 577 #: inc/customizer.php:93 578 578 msgid 'Here you can change the sidebar layout for pages.' 579 msgstr "" 580 581 #: inc/customizer.php:108 582 msgid "Single Page Breadcrumb" 579 583 msgstr "" 580 584 … … 682 686 msgstr "" 683 687 688 #: inc/customizer.php:340 689 msgid 'Slider Type' 690 msgstr "" 691 692 #: inc/customizer.php:353 693 msgid 'Add Slider Shortcode' 694 msgstr "" 695 684 696 #: inc/customizer.php:272 685 697 msgid 'Select Slider Image Page' … … 831 843 msgstr "" 832 844 845 #: inc/customizer.php:108 846 msgid "Single Post Breadcrumb" 847 msgstr "" 848 833 849 #: inc/customizer.php:604 834 850 msgid 'Author' … … 945 961 #: inc/customizer.php:808 946 962 msgid "Footer Background Color" 963 msgstr "" 964 965 #: inc/customizer.php:798 966 msgid "Footer top bottom padding" 947 967 msgstr "" 948 968 -
vw-restaurant-lite/1.8.4/page-template/custom-home-page.php
r178040 r178958 11 11 <?php if( get_theme_mod( 'vw_restaurant_lite_slider_hide_show', false) != '' || get_theme_mod( 'vw_restaurant_lite_resp_slider_hide_show', false) != '') { ?> 12 12 <section class="slider"> 13 <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel" data-bs-interval="<?php echo esc_attr(get_theme_mod( 'vw_restaurant_lite_slider_speed',4000)) ?>"> 14 <?php $vw_restaurant_lite_slider_pages = array(); 15 for ( $count = 1; $count <= 3; $count++ ) { 16 $mod = intval( get_theme_mod( 'vw_restaurant_lite_slider_page' . $count )); 17 if ( 'page-none-selected' != $mod ) { 18 $vw_restaurant_lite_slider_pages[] = $mod; 13 <?php if(get_theme_mod('vw_restaurant_lite_slider_type', 'Default slider') == 'Default slider' ){ ?> 14 <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel" data-bs-interval="<?php echo esc_attr(get_theme_mod( 'vw_restaurant_lite_slider_speed',4000)) ?>"> 15 <?php $vw_restaurant_lite_slider_pages = array(); 16 for ( $count = 1; $count <= 3; $count++ ) { 17 $mod = intval( get_theme_mod( 'vw_restaurant_lite_slider_page' . $count )); 18 if ( 'page-none-selected' != $mod ) { 19 $vw_restaurant_lite_slider_pages[] = $mod; 20 } 19 21 } 20 } 21 if( !empty($vw_restaurant_lite_slider_pages) ) : 22 $args = array( 23 'post_type' => 'page', 24 'post__in' => $vw_restaurant_lite_slider_pages, 25 'orderby' => 'post__in' 26 ); 27 $query = new WP_Query( $args ); 28 if ( $query->have_posts() ) : 29 $i = 1; 30 ?> 31 <div class="carousel-inner" role="listbox"> 32 <?php while ( $query->have_posts() ) : $query->the_post(); ?> 33 <div <?php if($i == 1){echo 'class="carousel-item active"';} else{ echo 'class="carousel-item"';}?>> 34 <?php if(has_post_thumbnail()){ 35 the_post_thumbnail(); 36 } else{?> 37 <img src="<?php echo esc_url(get_template_directory_uri()); ?>/inc/block-patterns/images/banner.png" alt="" /> 38 <?php } ?> 39 <div class="carousel-caption"> 40 <div class="inner_carousel"> 41 <?php if( get_theme_mod('vw_restaurant_lite_slider_title_hide_show',true) != ''){ ?> 42 <h1 class="wow lightSpeedIn delay-1000" data-wow-duration="2s"><a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo the_title_attribute(); ?>"><?php the_title(); ?></a></h1> 43 <?php } ?> 44 <?php if( get_theme_mod('vw_restaurant_lite_slider_content_hide_show',true) != ''){ ?> 45 <p class="wow lightSpeedIn delay-1000" data-wow-duration="2s"><?php $excerpt = get_the_excerpt(); echo esc_html( vw_restaurant_lite_string_limit_words( $excerpt, esc_attr(get_theme_mod('vw_restaurant_lite_slider_excerpt_number','30')))); ?></p> 46 <?php } ?> 47 <?php if( get_theme_mod('vw_restaurant_lite_slider_button_hide_show',true) != ''){ ?> 48 <?php if( get_theme_mod('vw_restaurant_lite_slider_button_text','READ MORE') != ''){ ?> 49 <div class="more-btn wow lightSpeedIn delay-1000" data-wow-duration="2s"> 50 <a class="button hvr-sweep-to-right" href="<?php echo esc_url(get_permalink()); ?>"><?php echo esc_html(get_theme_mod('vw_restaurant_lite_slider_button_text',__('READ MORE','vw-restaurant-lite')));?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('vw_restaurant_lite_slider_button_text',__('READ MORE','vw-restaurant-lite')));?></span></a> 51 </div> 22 if( !empty($vw_restaurant_lite_slider_pages) ) : 23 $args = array( 24 'post_type' => 'page', 25 'post__in' => $vw_restaurant_lite_slider_pages, 26 'orderby' => 'post__in' 27 ); 28 $query = new WP_Query( $args ); 29 if ( $query->have_posts() ) : 30 $i = 1; 31 ?> 32 <div class="carousel-inner" role="listbox"> 33 <?php while ( $query->have_posts() ) : $query->the_post(); ?> 34 <div <?php if($i == 1){echo 'class="carousel-item active"';} else{ echo 'class="carousel-item"';}?>> 35 <?php if(has_post_thumbnail()){ 36 the_post_thumbnail(); 37 } else{?> 38 <img src="<?php echo esc_url(get_template_directory_uri()); ?>/inc/block-patterns/images/banner.png" alt="" /> 39 <?php } ?> 40 <div class="carousel-caption"> 41 <div class="inner_carousel"> 42 <?php if( get_theme_mod('vw_restaurant_lite_slider_title_hide_show',true) != ''){ ?> 43 <h1 class="wow lightSpeedIn delay-1000" data-wow-duration="2s"><a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo the_title_attribute(); ?>"><?php the_title(); ?></a></h1> 52 44 <?php } ?> 53 <?php } ?> 45 <?php if( get_theme_mod('vw_restaurant_lite_slider_content_hide_show',true) != ''){ ?> 46 <p class="wow lightSpeedIn delay-1000" data-wow-duration="2s"><?php $excerpt = get_the_excerpt(); echo esc_html( vw_restaurant_lite_string_limit_words( $excerpt, esc_attr(get_theme_mod('vw_restaurant_lite_slider_excerpt_number','30')))); ?></p> 47 <?php } ?> 48 <?php if( get_theme_mod('vw_restaurant_lite_slider_button_hide_show',true) != ''){ ?> 49 <?php if( get_theme_mod('vw_restaurant_lite_slider_button_text','READ MORE') != ''){ ?> 50 <div class="more-btn wow lightSpeedIn delay-1000" data-wow-duration="2s"> 51 <a class="button hvr-sweep-to-right" href="<?php echo esc_url(get_permalink()); ?>"><?php echo esc_html(get_theme_mod('vw_restaurant_lite_slider_button_text',__('READ MORE','vw-restaurant-lite')));?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('vw_restaurant_lite_slider_button_text',__('READ MORE','vw-restaurant-lite')));?></span></a> 52 </div> 53 <?php } ?> 54 <?php } ?> 55 </div> 54 56 </div> 55 57 </div> 56 </div> 57 <?php $i++; endwhile; 58 wp_reset_postdata();?> 59 </div> 60 <?php else : ?> 61 <div class="no-postfound"></div> 62 <?php endif; 63 endif;?> 64 <a class="carousel-control-prev" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev" role="button"> 65 <span class="carousel-control-prev-icon w-auto h-auto" aria-hidden="true"><i class="fas fa-chevron-left"></i></span> 66 <span class="screen-reader-text"><?php esc_html_e( 'Previous','vw-restaurant-lite' );?></span> 67 </a> 68 <a class="carousel-control-next" data-bs-target="#carouselExampleCaptions" data-bs-slide="next" role="button"> 69 <span class="carousel-control-next-icon w-auto h-auto" aria-hidden="true"><i class="fas fa-chevron-right"></i></span> 70 <span class="screen-reader-text"><?php esc_html_e( 'Next','vw-restaurant-lite' );?></span> 71 </a> 72 </div> 73 <div class="clearfix"></div> 58 <?php $i++; endwhile; 59 wp_reset_postdata();?> 60 </div> 61 <?php else : ?> 62 <div class="no-postfound"></div> 63 <?php endif; 64 endif;?> 65 <a class="carousel-control-prev" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev" role="button"> 66 <span class="carousel-control-prev-icon w-auto h-auto" aria-hidden="true"><i class="fas fa-chevron-left"></i></span> 67 <span class="screen-reader-text"><?php esc_html_e( 'Previous','vw-restaurant-lite' );?></span> 68 </a> 69 <a class="carousel-control-next" data-bs-target="#carouselExampleCaptions" data-bs-slide="next" role="button"> 70 <span class="carousel-control-next-icon w-auto h-auto" aria-hidden="true"><i class="fas fa-chevron-right"></i></span> 71 <span class="screen-reader-text"><?php esc_html_e( 'Next','vw-restaurant-lite' );?></span> 72 </a> 73 </div> 74 <div class="clearfix"></div> 75 <?php } else if(get_theme_mod('vw_restaurant_lite_slider_type', 'Advance slider') == 'Advance slider'){?> 76 <?php echo do_shortcode(get_theme_mod('vw_restaurant_lite_advance_slider_shortcode')); ?> 77 <?php } ?> 74 78 </section> 75 79 <?php }?> -
vw-restaurant-lite/1.8.4/page.php
r139602 r178958 20 20 <?php $vw_restaurant_lite_theme_lay = get_theme_mod( 'vw_restaurant_lite_page_layout','One Column'); 21 21 if($vw_restaurant_lite_theme_lay == 'One Column'){ ?> 22 <?php if(get_theme_mod('vw_restaurant_lite_single_page_breadcrumb',true) != ''){ ?> 23 <div class="bradcrumbs"> 24 <?php vw_restaurant_lite_the_breadcrumb(); ?> 25 </div> 26 <?php }?> 22 27 <?php while ( have_posts() ) : the_post(); 23 28 get_template_part( 'template-parts/content-page'); … … 26 31 <div class="row"> 27 32 <div class="col-lg-8 col-md-8"> 33 <?php if(get_theme_mod('vw_restaurant_lite_single_page_breadcrumb',true) != ''){ ?> 34 <div class="bradcrumbs"> 35 <?php vw_restaurant_lite_the_breadcrumb(); ?> 36 </div> 37 <?php }?> 28 38 <?php while ( have_posts() ) : the_post(); 29 39 get_template_part( 'template-parts/content-page'); … … 44 54 </div> 45 55 <div class="col-lg-8 col-md-8"> 56 <?php if(get_theme_mod('vw_restaurant_lite_single_page_breadcrumb',true) != ''){ ?> 57 <div class="bradcrumbs"> 58 <?php vw_restaurant_lite_the_breadcrumb(); ?> 59 </div> 60 <?php }?> 46 61 <?php while ( have_posts() ) : the_post(); 47 62 get_template_part( 'template-parts/content-page'); … … 52 67 <div class="row"> 53 68 <div class="col-lg-8 col-md-8"> 69 <?php if(get_theme_mod('vw_restaurant_lite_single_page_breadcrumb',true) != ''){ ?> 70 <div class="bradcrumbs"> 71 <?php vw_restaurant_lite_the_breadcrumb(); ?> 72 </div> 73 <?php }?> 54 74 <?php while ( have_posts() ) : the_post(); 55 75 get_template_part( 'template-parts/content-page'); -
vw-restaurant-lite/1.8.4/readme.txt
r178040 r178958 3 3 Tags:left-sidebar, right-sidebar, one-column, two-columns, three-columns, four-columns, grid-layout, wide-blocks, block-styles, block-patterns, custom-colors, custom-background, custom-logo, custom-menu, custom-header, editor-style, post-formats, flexible-header, featured-images, footer-widgets, sticky-post, buddypress, full-width-template, theme-options, threaded-comments, translation-ready, rtl-language-support, food-and-drink, blog, e-commerce 4 4 Requires at least: 5.0 5 Tested up to: 6. 05 Tested up to: 6.1 6 6 Requires PHP: 7.2 7 Stable tag: 1.8. 37 Stable tag: 1.8.4 8 8 License: GPLv3.0 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 469 469 -- Updated language folder. 470 470 471 = 1.8.4 = 472 -- Add CSS on slider image. 473 -- Add footer padding option in customizer. 474 -- Add social icon setup steps in customizer. 475 -- Add slider type option in customizer. 476 -- Added show / hide single post breadcrumb option in customizer. 477 -- Added show / hide single page breadcrumb option in customizer. 478 -- Added homepage settings panel and others settings panel in customizer. 479 -- Added premium features for every section in customizer. 480 -- Updated language folder. 481 471 482 == Resources == 472 483 -
vw-restaurant-lite/1.8.4/single.php
r139602 r178958 17 17 <div class="sidebar col-lg-4 col-md-4"><?php dynamic_sidebar('sidebar-1'); ?></div> 18 18 <div class="col-lg-8 col-md-8 content-vw" > 19 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 20 <div class="bradcrumbs"> 21 <?php vw_restaurant_lite_the_breadcrumb(); ?> 22 </div> 23 <?php }?> 19 24 <?php if ( have_posts() ) : 20 25 while ( have_posts() ) : the_post(); … … 31 36 <div class="row"> 32 37 <div class="col-lg-8 col-md-8 content-vw" > 38 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 39 <div class="bradcrumbs"> 40 <?php vw_restaurant_lite_the_breadcrumb(); ?> 41 </div> 42 <?php }?> 33 43 <?php if ( have_posts() ) : 34 44 while ( have_posts() ) : the_post(); … … 45 55 <?php }else if($vw_restaurant_lite_left_right == 'One Column'){ ?> 46 56 <div class="content-vw"> 57 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 58 <div class="bradcrumbs"> 59 <?php vw_restaurant_lite_the_breadcrumb(); ?> 60 </div> 61 <?php }?> 47 62 <?php if ( have_posts() ) : 48 63 while ( have_posts() ) : the_post(); … … 59 74 <div class="sidebar col-lg-3 col-md-3"><?php dynamic_sidebar('sidebar-1'); ?></div> 60 75 <div class="col-lg-6 col-md-6 content-vw" > 76 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 77 <div class="bradcrumbs"> 78 <?php vw_restaurant_lite_the_breadcrumb(); ?> 79 </div> 80 <?php }?> 61 81 <?php if ( have_posts() ) : 62 82 while ( have_posts() ) : the_post(); … … 75 95 <div class="sidebar col-lg-3 col-md-3"><?php dynamic_sidebar('sidebar-1'); ?></div> 76 96 <div class="col-lg-3 col-md-3 content-vw" > 77 <?php if ( have_posts() ) : 97 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 98 <div class="bradcrumbs"> 99 <?php vw_restaurant_lite_the_breadcrumb(); ?> 100 </div> 101 <?php }?> 102 <?php if ( have_posts() ) : 78 103 while ( have_posts() ) : the_post(); 79 104 get_template_part( 'template-parts/content-single' ); … … 106 131 <div class="row"> 107 132 <div class="col-lg-8 col-md-8 content-vw" > 133 <?php if(get_theme_mod('vw_restaurant_lite_single_post_breadcrumb',true) != ''){ ?> 134 <div class="bradcrumbs"> 135 <?php vw_restaurant_lite_the_breadcrumb(); ?> 136 </div> 137 <?php }?> 108 138 <?php if ( have_posts() ) : 109 139 while ( have_posts() ) : the_post(); -
vw-restaurant-lite/1.8.4/style.css
r178040 r178958 5 5 Author URI: https://www.vwthemes.com 6 6 Description: VW Restaurant Lite Theme is a responsive multipurpose restaurant WordPress theme which is ideal for all types of hotel and food related websites. It best suits the food critics, food bloggers, eatery, food joint, lodge, hospitality business, bakery, cake, pizza shops, tea shops, burger shops, multi-cuisine, cooking compititions, fine dining, culinary, sushi restaurants, bakers street, biscuite shop, barbecues, Baker, Ice Cream corner, Bread, Chef, cafe, coffee or any food business such as barbecues, grill houses, Italian restaurants, fast food, cafeteria, delivery, diner, lunch, cafes, table reservation, Japanese, butchery, food delivering, Thai restaurants, barbeque place, share the recipes with the crowd, food delivery service, baked snacks, take away and pizzerias. The baker can display his cakes and the restaurants can put their recipe, cuisine and Chinese dishes as well. It is a beautiful, professional, interactive, and highly responsive WordPress theme built with the intention to create stunning websites that will suit elegant restaurants. This free theme has got various shortcodes and personalization options making it user-friendly and allowing you to design your site with the available secure and clean code. It has sharp looking testimonial section wherein you can feature the feedbacks of clients who are appreciate your services. There is Call to Action Button on the widely displayed pages having banner giving it an exclusive appearance. This theme is completely SEO friendly that helps in keeping your site on top of search engines. Furthermore, it has social media integration tools that make the visitors familiar with your social media presence. Built on Bootstrap, it comes with ready translation. It has many features like RTL Language Support, Post Formats, Theme Options, image slider, Custom Container Width, Boxed layout, Customization Options and many more. Having optimized codes, the theme has faster page load time giving a smooth experience to the visitors. It is a readily mobile friendly theme having animated features that makes your site appear best on mobile devices. It is having e-commerce functionality as well. Check Demo at: https://www.vwthemes.net/vw-restaurant-theme/ 7 Tested up to: 6. 07 Tested up to: 6.1 8 8 Requires PHP: 7.2 9 Version: 1.8. 39 Version: 1.8.4 10 10 License: GPLv3.0 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 250 250 width: 100%; 251 251 opacity: 0.7; 252 object-fit: cover; 252 253 } 253 254 .slider .carousel-item-next,.slider .carousel-item-prev,.slider .carousel-item.active { … … 764 765 color: #000; 765 766 } 767 768 /* --------- POST --------- */ 769 .bradcrumbs{ 770 padding:30px 0; 771 } 772 .bradcrumbs a{ 773 background:transparent; 774 color: #ffea54; 775 border: 3px solid #ffea54; 776 padding:8px 15px; 777 margin-right:5px; 778 font-weight: 700; 779 } 780 .bradcrumbs a:hover{ 781 background:#ffea54; 782 color: #000; 783 } 784 .bradcrumbs span{ 785 background:transparent; 786 color: #ffea54; 787 border: 3px solid #ffea54; 788 padding:8px 15px; 789 font-weight: 700; 790 } 766 791 /* Comments BOX */ 767 792 .comments{
Note: See TracChangeset
for help on using the changeset viewer.