ID; /* Check that the user hasn't already clicked to ignore the message */ if( ! get_user_meta( $user_id, 'di_restaurant_ignore_notice' ) ) { echo '

'; printf( __( 'Thank you for activating Di Restaurant Theme. Let start from Documentation | Visit Demo | Customize Now | Hide it', 'di-restaurant' ), 'https://dithemes.com/di-restaurant-free-wordpress-theme-documentation/', 'http://demo.dithemes.com/di-restaurant/', esc_url( get_admin_url() . 'customize.php' ) , esc_url( add_query_arg( 'di_restaurant_notics_ignore', '0' ) ) ); echo "

"; } } public function handle_admin_notice() { global $current_user; $user_id = $current_user->ID; if( isset( $_GET['di_restaurant_notics_ignore']) && '0' == $_GET['di_restaurant_notics_ignore'] ) { add_user_meta( $user_id, 'di_restaurant_ignore_notice', 'true', true ); } } public function delete_user_meta_ignore_notice() { global $current_user; $user_id = $current_user->ID; if( get_user_meta( $user_id, 'di_restaurant_ignore_notice' ) ) { delete_user_meta( $user_id, 'di_restaurant_ignore_notice' ); } } public function color_options_clbk() { Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_clroptions_freecon', 'label' => esc_attr__( 'More Color Options', 'di-restaurant' ), 'section' => 'color_options', 'default' => '
' . esc_html__( 'More color options are available in', 'di-restaurant' ) . ' ' . esc_html__( 'Di Restaurant Pro', 'di-restaurant' ) . '.
', 'active_callback' => array( array( 'setting' => 'endis_ftr_wdgt', 'operator' => '==', 'value' => 1, ), ) ) ); } public function blog_options_clbk() { Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_blog_options_freecon', 'label' => esc_attr__( 'Color Options', 'di-restaurant' ), 'section' => 'blog_options', 'default' => '
' . esc_html__( 'Color options are available in', 'di-restaurant' ) . ' ' . esc_html__( 'Di Restaurant Pro', 'di-restaurant' ) . '.
', 'active_callback' => array( array( 'setting' => 'endis_ftr_wdgt', 'operator' => '==', 'value' => 1, ), ) ) ); } public function footer_widget_options_clbk() { Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_footer_options_freecon', 'label' => esc_attr__( 'Color Options', 'di-restaurant' ), 'section' => 'footer_options', 'default' => '
' . esc_html__( 'Color options are available in', 'di-restaurant' ) . ' ' . esc_html__( 'Di Restaurant Pro', 'di-restaurant' ) . '.
', 'active_callback' => array( array( 'setting' => 'endis_ftr_wdgt', 'operator' => '==', 'value' => 1, ), ) ) ); } public function the_head() { ?> get_setting( 'custom_logo' )->transport = 'refresh'; // Blog name partial refresh handle. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-name-pr', 'render_callback' => function() { return esc_html( get_bloginfo( 'name' ) ); }, ) ); // Blog header_image partial refresh handle. $wp_customize->get_setting( 'header_image' )->transport = 'refresh'; $wp_customize->selective_refresh->add_partial( 'header_image', array( 'selector' => '.wp-custom-header', ) ); // Top Main menu partial refresh handle. $wp_customize->add_setting( 'top_main_menu_hidden_field', array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'top_main_menu_hidden_field', array( 'priority' => 25, 'type' => 'hidden', 'section' => 'menu_locations', ) ); $wp_customize->get_setting( 'top_main_menu_hidden_field' )->transport = 'refresh'; $wp_customize->selective_refresh->add_partial( 'top_main_menu_hidden_field', array( 'selector' => '.nav.navbar-nav.primary-menu', ) ); // For social profile. $wp_customize->get_setting( 'sprofile_link_facebook' )->transport = 'refresh'; $wp_customize->selective_refresh->add_partial( 'sprofile_link_facebook', array( 'selector' => '.icons-social-div-pr', ) ); if( class_exists( 'WooCommerce' ) ) { // For Woo icons. $wp_customize->get_setting( 'shop_icon_endis' )->transport = 'refresh'; $wp_customize->selective_refresh->add_partial( 'shop_icon_endis', array( 'selector' => '.woo-social-div-pr', ) ); } // For back to top icon. $wp_customize->get_setting( 'back_to_top' )->transport = 'refresh'; $wp_customize->selective_refresh->add_partial( 'back_to_top', array( 'selector' => '.back-to-top', ) ); } public function page_sidebar_file() { if( is_active_sidebar( 'sidebar_page' ) ) { dynamic_sidebar( 'sidebar_page' ); } } public function post_sidebar_file() { if( is_active_sidebar( 'sidebar-1' ) ) { dynamic_sidebar( 'sidebar-1' ); } } public function footer_copyright_right_setting_clbk() { Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_footer_copy_options_fc', 'label' => esc_attr__( 'Footer Right', 'di-restaurant' ), 'section' => 'footer_copy_options', 'default' => '
' . esc_html__( 'Footer Right Option and Color Options are available in', 'di-restaurant' ) . ' ' . esc_html__( 'Di Restaurant Pro', 'di-restaurant' ) . '.
', ) ); } public function cutmzr_theme_info_clbk() { Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_theme_info_sprt_fc', 'label' => esc_attr__( 'Di Restaurant Support', 'di-restaurant' ), 'section' => 'theme_info', 'default' => '
' . esc_html__( 'If you want our support, Please', 'di-restaurant' ) . ' ' . esc_html__( 'Create a Support Topic', 'di-restaurant' ) . '.
', ) ); Kirki::add_field( 'di_restaurant_config', array( 'type' => 'custom', 'settings' => 'custom_theme_info_pro_fc', 'label' => esc_attr__( 'Di Restaurant Pro', 'di-restaurant' ), 'section' => 'theme_info', 'default' => '
' . __( 'Premium Features:
- All Color Options
- Option to Update Footer Right Credit
- Widget Creation and Selection
- Advance Header Image
- Slider in Header
- Premium Support
', 'di-restaurant' ) . ' ' . esc_html__( 'Get Di Restaurant Pro', 'di-restaurant' ) . '
', ) ); } public function excerpt_length() { return absint( get_theme_mod( 'excerpt_length', '40' ) ); } public function excerpt_more( $more ) { global $post; return '...
'; } public function footer_cprt_right_contents() { printf( /* translators: 1: p tag open, 2: p tag close, 3: a tag open and FA icon, 4: a tag close */ esc_html__( '%1$sWordPress %3$s Di Restaurant%4$s Theme%2$s', 'di-restaurant' ), '

', '

', '', '' ); } public function header_img_file_clbk() { ?>