$themename = "renovate"; /*function your_prefix_vcSetAsTheme() { vc_set_as_theme(); } add_action('init', 'your_prefix_vcSetAsTheme');*/ if(function_exists('set_revslider_as_theme')) { function renovate_set_revolution_as_theme() { set_revslider_as_theme(); } add_action('init', 'renovate_set_revolution_as_theme'); } //plugins activator require_once("plugins_activator.php"); //for is_plugin_active include_once( ABSPATH . 'wp-admin/includes/plugin.php'); //vc_remove_element("vc_row_inner"); if(function_exists("vc_remove_element")) { vc_remove_element("vc_gmaps"); vc_remove_element("vc_tour"); vc_remove_element("vc_separator"); vc_remove_element("vc_text_separator"); } //theme options re_get_theme_file("/theme-options.php"); //menu walker re_get_theme_file("/mobile_menu_walker.php"); //custom meta box re_get_theme_file("/meta-box.php"); if(function_exists("vc_map")) { //contact_form re_get_theme_file("/contact_form.php"); //shortcodes re_get_theme_file("/shortcodes/shortcodes.php"); } //comments re_get_theme_file("/comments-functions.php"); //widgets re_get_theme_file("/widgets/widget-contact-info.php"); re_get_theme_file("/widgets/widget-contact-details.php"); re_get_theme_file("/widgets/widget-contact-details-list.php"); re_get_theme_file("/widgets/widget-list.php"); re_get_theme_file("/widgets/widget-recent.php"); re_get_theme_file("/widgets/widget-social-icons.php"); re_get_theme_file("/widgets/widget-cart-icon.php"); function re_theme_after_setup_theme() { global $themename; //set default theme options if(!get_option($themename . "_installed") || !get_option("wpb_js_content_types") || !get_option("renovate_vc_access_rules")) { $theme_options = array( "favicon_url" => get_template_directory_uri() . "/images/favicon.ico", "logo_url" => "", "logo_text" => "RENOVATE", "footer_text" => sprintf(__('© Copyright 2021 Renovate Theme by QuanticaLabs', 'renovate'), esc_html__('Renovate Theme', 'renovate'), esc_url(__('https://1.envato.market/renovate-construction-renovation-wordpress-theme', 'renovate')), esc_html__('QuanticaLabs', 'renovate'), esc_url(__('https://quanticalabs.com', 'renovate'))), "sticky_menu" => 0, "responsive" => 1, "scroll_top" => 1, "layout" => 'fullwidth', "layout_style" => '', "layout_image_overlay" => '', "style_selector" => 0, "direction" => "default", "collapsible_mobile_submenus" => 1, "google_api_code" => "", "google_recaptcha" => "", "google_recaptcha_comments" => "", "recaptcha_site_key" => "", "recaptcha_secret_key" => "", "ga_tracking_id" => "", "ga_tracking_code" => "", "cf_admin_name" => get_option("admin_email"), "cf_admin_email" => get_option("admin_email"), "cf_admin_name_from" => "", "cf_admin_email_from" => "", "cf_smtp_host" => "", "cf_smtp_username" => "", "cf_smtp_password" => "", "cf_smtp_port" => "", "cf_smtp_secure" => "", "cf_email_subject" => "Renovate WP: Contact from WWW", "cf_template" => "
Name: [name]
E-mail: [email]
Phone: [phone]
Message: [message]
[form_data] ", "cf_name_message" => __("Please enter your name.", 'renovate'), "cf_email_message" => __("Please enter valid e-mail.", 'renovate'), "cf_phone_message" => __("Please enter your phone number.", 'renovate'), "cf_message_message" => __("Please enter your message.", 'renovate'), "cf_recaptcha_message" => __("Please verify captcha.", 'renovate'), "cf_terms_message" => __("Checkbox is required.", 'renovate'), "cf_thankyou_message" => __("Thank you for contacting us", 'renovate'), "cf_error_message" => __("Sorry, we can't send this message", 'renovate'), "cf_name_message_comments" => __("Please enter your name.", 'renovate'), "cf_email_message_comments" => __("Please enter valid e-mail.", 'renovate'), "cf_comment_message_comments" => __("Please enter your message.", 'renovate'), "cf_recaptcha_message_comments" => __("Please verify captcha.", 'renovate'), "cf_terms_message_comments" => __("Checkbox is required.", 'renovate'), "cf_thankyou_message_comments" => __("Your comment has been added.", 'renovate'), "cf_error_message_comments" => __("Error while adding comment.", 'renovate'), "site_background_color" => '', "main_color" => '', "header_top_sidebar" => '', "primary_font" => '', "primary_font_custom" => '' ); add_option($themename . "_options", $theme_options); add_option("wpb_js_content_types", array( "page", "re_projects", "re_services", "ql_services", "ql_team") ); $admin_role = get_role("administrator"); $admin_role->add_cap("vc_access_rules_post_types", "custom" ); $admin_role->add_cap("vc_access_rules_post_types/post"); $admin_role->add_cap("vc_access_rules_post_types/page"); $admin_role->add_cap("vc_access_rules_post_types/re_projects"); $admin_role->add_cap("vc_access_rules_post_types/ql_services"); $admin_role->add_cap("vc_access_rules_post_types/ql_team"); add_option("renovate_vc_access_rules", 1); global $wp_rewrite; $wp_rewrite->flush_rules(); add_option($themename . "_installed", 1); } //set default cost calculator options if(is_plugin_active("ql-cost-calculator/ql-cost-calculator.php")) { if(!get_option($themename . "cost_calculator_installed")) { $cost_calculator_global_form_options = array( "calculator_skin" => "renovate", "main_color" => "F4BC16", "box_color" => "F5F5F5", "text_color" => "444444", "border_color" => "E2E6E7", "label_color" => "25282A", "dropdowncheckbox_label_color" => "25282A", "form_label_color" => "", "inactive_color" => "E2E6E7", "tooltip_background_color" => "", "primary_font_custom" => "", "primary_font" => "", "primary_font_subset" => "", "secondary_font_custom" => "", "secondary_font" => "Raleway:300", "secondary_font_subset" => array("latin", "latin-ext"), "send_email" => 1, "save_calculation" => 1, "calculation_status" => "draft", "google_recaptcha" => 0, "recaptcha_site_key" => "", "recaptcha_secret_key" => "", "wpbakery_noconflict" => "" ); update_option("cost_calculator_global_form_options", $cost_calculator_global_form_options); add_option($themename . "cost_calculator_installed", 1); } } //Make theme available for translation //Translations can be filed in the /languages/ directory load_theme_textdomain('renovate', get_template_directory() . '/languages'); //woocommerce add_theme_support("woocommerce", array( 'gallery_thumbnail_image_width' => 150) ); add_theme_support("wc-product-gallery-zoom"); add_theme_support("wc-product-gallery-lightbox"); add_theme_support("wc-product-gallery-slider"); //register thumbnails add_theme_support("post-thumbnails"); add_image_size("blog-post-thumb", 750, 500, true); add_image_size("project-thumb", 570, 380, true); add_image_size("large-thumb", 480, 480, true); add_image_size("big-thumb", 480, 320, true); add_image_size("medium-thumb", 390, 260, true); add_image_size("small-thumb", 270, 180, true); add_image_size("tiny-thumb", 90, 90, true); //enable custom background add_theme_support("custom-background"); //3.4 //add_custom_background(); //deprecated //enable feed links add_theme_support("automatic-feed-links"); //title tag add_theme_support("title-tag"); //gutenberg add_theme_support("wp-block-styles"); add_theme_support("align-wide"); add_theme_support("editor-color-palette", array( array( 'name' => __("renovate yellow", 'renovate'), 'slug' => 'renovate-yellow', 'color' => '#F4BC16', ), array( 'name' => __("renovate turquoise", 'renovate' ), 'slug' => 'renovate-turquoise', 'color' => '#5FC7AE', ), array( 'name' => __("renovate orange", 'renovate' ), 'slug' => 'renovate-orange', 'color' => '#F68220', ), array( 'name' => __("renovate green", 'renovate' ), 'slug' => 'renovate-green', 'color' => '#82B541', ), array( 'name' => __("renovate light blue", 'renovate' ), 'slug' => 'renovate-light-blue', 'color' => '#66A1C3', ) )); //register menus if(function_exists("register_nav_menu")) { register_nav_menu("main-menu", "Main Menu"); } //custom theme filters add_filter('upload_mimes', 're_custom_upload_files'); //using shortcodes in sidebar add_filter("widget_text", "do_shortcode"); add_filter("image_size_names_choose", "re_theme_image_sizes"); add_filter('wp_list_categories','re_category_count_span'); add_filter('get_archives_link', 're_archive_count_span'); add_filter('excerpt_more', 're_theme_excerpt_more', 99); add_filter('post_class', 're_check_image'); add_filter('user_contactmethods', 're_contactmethods', 10, 1); add_filter('wp_title', 're_wp_title_filter', 10, 2); add_filter('site_transient_update_plugins', 'renovate_filter_update_vc_plugin', 10, 2); //custom theme woocommerce filters add_filter('woocommerce_pagination_args' , 're_woo_custom_override_pagination_args'); add_filter('woocommerce_product_single_add_to_cart_text', 're_woo_custom_cart_button_text'); add_filter('woocommerce_product_add_to_cart_text', 're_woo_custom_cart_button_text'); add_filter('loop_shop_columns', 're_woo_custom_loop_columns'); add_filter('woocommerce_product_description_heading', 're_woo_custom_product_description_heading'); add_filter('woocommerce_checkout_fields' , 're_woo_custom_override_checkout_fields'); add_filter('woocommerce_show_page_title', 're_woo_custom_show_page_title'); add_filter('loop_shop_per_page', 're_loop_shop_per_page', 20); add_filter('woocommerce_review_gravatar_size', 're_woo_custom_review_gravatar_size'); add_filter('theme_page_templates', 're_woocommerce_page_templates' , 11, 3); //custom theme actions if(!function_exists('_wp_render_title_tag')) add_action('wp_head', 're_theme_slug_render_title'); add_action("add_meta_boxes", "re_theme_add_ql_services_custom_box"); add_action("save_post", "re_theme_save_ql_services_postdata"); //custom theme woocommerce actions remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5); remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10); remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10); remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5); //remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20); add_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 5); add_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 10); add_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10); //add_action('woocommerce_after_shop_loop', 'woocommerce_result_count', 20); //phpMailer add_action('phpmailer_init', 're_phpmailer_init'); //content width if(!isset($content_width)) $content_width = 1050; //register sidebars if(function_exists("register_sidebar")) { //register custom sidebars $sidebars_list = get_posts(array( 'post_type' => $themename . '_sidebars', 'posts_per_page' => '-1', 'post_status' => 'publish', 'orderby' => 'menu_order', 'order' => 'ASC' )); foreach($sidebars_list as $sidebar) { $before_widget = get_post_meta($sidebar->ID, "before_widget", true); $after_widget = get_post_meta($sidebar->ID, "after_widget", true); $before_title = get_post_meta($sidebar->ID, "before_title", true); $after_title = get_post_meta($sidebar->ID, "after_title", true); register_sidebar(array( "id" => $sidebar->post_name, "name" => $sidebar->post_title, 'before_widget' => ($before_widget!='' && $before_widget!='empty' ? $before_widget : ''), 'after_widget' => ($after_widget!='' && $after_widget!='empty' ? $after_widget : ''), 'before_title' => ($before_title!='' && $before_title!='empty' ? $before_title : ''), 'after_title' => ($after_title!='' && $after_title!='empty' ? $after_title : '') )); } } } add_action("after_setup_theme", "re_theme_after_setup_theme"); function re_theme_switch_theme($theme_template) { global $themename; delete_option($themename . "_installed"); } add_action("switch_theme", "re_theme_switch_theme"); /* --- phpMailer config --- */ function re_phpmailer_init($mail) { global $theme_options; $mail->CharSet='UTF-8'; $smtp = $theme_options["cf_smtp_host"]; if(!empty($smtp)) { $mail->IsSMTP(); $mail->SMTPAuth = true; //$mail->SMTPDebug = 2; $mail->Host = $theme_options["cf_smtp_host"]; $mail->Username = $theme_options["cf_smtp_username"]; $mail->Password = $theme_options["cf_smtp_password"]; if((int)$theme_options["cf_smtp_port"]>0) $mail->Port = (int)$theme_options["cf_smtp_port"]; $mail->SMTPSecure = $theme_options["cf_smtp_secure"]; } } function re_custom_template_for_vc() { $data = array(); $data['name'] = __('Single Post Template', 'renovate'); $data['weight'] = 0; $data['image_path'] = preg_replace( '/\s/', '%20', get_template_directory_uri() . '/admin/images/visual_composer/layout.png'); $data['custom_class'] = 'custom_template_for_vc_custom_template'; $data['content'] = <<Vehicula Dolor[/vc_wp_text][vc_wp_categories options="" el_class="page-margin-top clearfix" title="Categories"][vc_wp_archives options="count" title="Archives" el_class="page-margin-top full-width clearfix"][vc_wp_tagcloud taxonomy="post_tag" title="Tags" el_class="page-margin-top clearfix"][/vc_column][/vc_row] CONTENT; vc_add_default_templates($data); $data = array(); $data['name'] = __('Blog Template', 'renovate'); $data['weight'] = 0; $data['image_path'] = preg_replace( '/\s/', '%20', get_template_directory_uri() . '/admin/images/visual_composer/layout.png'); $data['custom_class'] = 'custom_template_for_vc_custom_template'; $data['content'] = <<Vehicula Dolor[/vc_wp_text][vc_wp_categories options="" el_class="page-margin-top clearfix" title="Categories"][vc_wp_archives options="count" title="Archives" el_class="page-margin-top full-width clearfix"][vc_wp_tagcloud taxonomy="post_tag" title="Tags" el_class="page-margin-top clearfix"][/vc_column][/vc_row] CONTENT; vc_add_default_templates($data); $data = array(); $data['name'] = __('Search Page Template', 'renovate'); $data['weight'] = 0; $data['image_path'] = preg_replace( '/\s/', '%20', get_template_directory_uri() . '/admin/images/visual_composer/layout.png'); $data['custom_class'] = 'custom_template_for_vc_custom_template'; $data['content'] = <<Vehicula Dolor[/vc_wp_text][vc_wp_categories options="" el_class="page-margin-top clearfix" title="Categories"][vc_wp_archives options="count" title="Archives" el_class="page-margin-top full-width clearfix"][vc_wp_tagcloud taxonomy="post_tag" title="Tags" el_class="page-margin-top clearfix"][/vc_column][/vc_row] CONTENT; vc_add_default_templates($data); $data = array(); $data['name'] = __('Single Project Template', 'renovate'); $data['weight'] = 0; $data['image_path'] = preg_replace( '/\s/', '%20', get_template_directory_uri() . '/admin/images/visual_composer/layout.png'); $data['custom_class'] = 'custom_template_for_vc_custom_template'; $data['content'] = << 'application/xml'), array('json' => 'application/json'), array('zip' => 'application/zip'), array('gz' => 'application/x-gzip'), array('ico' => 'image/x-icon')); return $mimes; } function re_theme_image_sizes($sizes) { $addsizes = array( "blog-post-thumb" => __("Blog post thumbnail", 'renovate'), "project-thumb" => __("Project thumbnail", 'renovate'), "large-thumb" => __("Large thumbnail", 'renovate'), "big-thumb" => __("Big thumbnail", 'renovate'), "medium-thumb" => __("Medium thumbnail", 'renovate'), "small-thumb" => __("Small thumbnail", 'renovate'), "tiny-thumb" => __("Tiny thumbnail", 'renovate'), ); $newsizes = array_merge($sizes, $addsizes); return $newsizes; } function re_category_count_span($links) { $links = str_replace(' (', '', $links); $links = str_replace(')', '', $links); return $links; } function re_archive_count_span($links) { $links = str_replace(' (', '', $links); $links = str_replace(')', '', $links); return $links; } //excerpt function re_theme_excerpt_more($more) { return ''; } //sticky function re_check_image($class) { if(is_sticky()) $class[] = 'sticky'; return $class; } //user info function re_contactmethods($contactmethods) { $contactmethods['twitter'] = 'Twitter'; $contactmethods['facebook'] = 'Facebook'; $contactmethods['linkedin'] = 'Linkedin'; $contactmethods['skype'] = 'Skype'; $contactmethods['googleplus'] = 'Google Plus'; $contactmethods['instagram'] = 'Instagram'; return $contactmethods; } if(!function_exists('_wp_render_title_tag')) { function re_theme_slug_render_title() { echo ''. wp_title('-', true, 'right') . ''; } } function re_wp_title_filter($title, $sep) { //$title = get_bloginfo('name') . " | " . (is_home() || is_front_page() ? get_bloginfo('description') : $title); return $title; } function renovate_filter_update_vc_plugin($date) { if(!empty($date->checked["js_composer/js_composer.php"])) unset($date->checked["js_composer/js_composer.php"]); if(!empty($date->response["js_composer/js_composer.php"])) unset($date->response["js_composer/js_composer.php"]); return $date; } //Adds a box to the main column on the Services edit screens function re_theme_add_ql_services_custom_box() { add_meta_box( "ql_services_config", __("Options", 'renovate'), "re_theme_inner_ql_services_custom_box_main", "ql_services", "side", "core" ); } function re_theme_inner_ql_services_custom_box_main($post) { global $themename; //Use nonce for verification wp_nonce_field(plugin_basename( __FILE__ ), $themename . "_ql_services_noncename"); //The actual fields for data entry $icon = get_post_meta($post->ID, "icon", true); $custom_url = get_post_meta($post->ID, "ql_services_custom_url", true); echo '
'; } //When the post is saved, saves our custom data function re_theme_save_ql_services_postdata($post_id) { global $themename; //verify if this is an auto save routine. //if it is our form has not been submitted, so we dont want to do anything if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return; //verify this came from the our screen and with proper authorization, //because save_post can be triggered at other times if (!isset($_POST[$themename . '_ql_services_noncename']) || !wp_verify_nonce($_POST[$themename . '_ql_services_noncename'], plugin_basename( __FILE__ ))) return; //Check permissions if(!current_user_can('edit_post', $post_id)) return; //OK, we're authenticated: we need to find and save the data update_post_meta($post_id, "icon", $_POST["ql_services_icon"]); update_post_meta($post_id, "ql_services_custom_url", $_POST["ql_services_custom_url"]); } /* --- Theme WooCommerce Custom Filters Functions --- */ function re_woo_custom_override_pagination_args($args) { $args['prev_text'] = __('‹', 'renovate'); $args['next_text'] = __('›', 'renovate'); return $args; } function re_woo_custom_cart_button_text() { return __('ADD TO CART', 'renovate'); } if(!function_exists('loop_columns')) { function re_woo_custom_loop_columns() { return 3; // 3 products per row } } function re_woo_custom_product_description_heading() { return ''; } function re_woo_custom_show_page_title() { return false; } function re_loop_shop_per_page($cols) { return 6; } function re_woo_custom_override_checkout_fields($fields) { $fields['billing']['billing_first_name']['placeholder'] = __("First Name", 'renovate'); $fields['billing']['billing_last_name']['placeholder'] = __("Last Name", 'renovate'); $fields['billing']['billing_company']['placeholder'] = __("Company Name", 'renovate'); $fields['billing']['billing_email']['placeholder'] = __("Email Address", 'renovate'); $fields['billing']['billing_phone']['placeholder'] = __("Phone", 'renovate'); return $fields; } function re_woo_custom_review_gravatar_size() { return 100; } function re_woocommerce_page_templates($page_templates, $class, $post) { if(is_plugin_active('woocommerce/woocommerce.php')) { $shop_page_id = wc_get_page_id('shop'); if($post && absint($shop_page_id) === absint($post->ID)) { $page_templates["path-to-template/full-width.php"] = "Template Name"; } } return $page_templates; } //admin functions re_get_theme_file("/admin/functions.php"); //theme options global $theme_options; $theme_options = array( "favicon_url" => '', "logo_url" => '', "logo_text" => '', "footer_text" => '', "sticky_menu" => '', "responsive" => '', "scroll_top" => '', "style_selector" => '', "direction" => '', "collapsible_mobile_submenus" => '', "google_api_code" => '', "google_recaptcha" => '', "google_recaptcha_comments" => '', "recaptcha_site_key" => '', "recaptcha_secret_key" => '', "ga_tracking_id" => '', "ga_tracking_code" => '', "cf_admin_name" => '', "cf_admin_email" => '', "cf_admin_name_from" => '', "cf_admin_email_from" => '', "cf_smtp_host" => '', "cf_smtp_username" => '', "cf_smtp_password" => '', "cf_smtp_port" => '', "cf_smtp_secure" => '', "cf_email_subject" => '', "cf_template" => '', "cf_name_message" => '', "cf_email_message" => '', "cf_phone_message" => '', "cf_message_message" => '', "cf_recaptcha_message" => '', "cf_terms_message" => '', "cf_thankyou_message" => '', "cf_error_message" => '', "cf_name_message_comments" => '', "cf_email_message_comments" => '', "cf_comment_message_comments" => '', "cf_recaptcha_message_comments" => '', "cf_terms_message_comments" => '', "cf_thankyou_message_comments" => '', "cf_error_message_comments" => '', "site_background_color" => '', "main_color" => '', "header_top_sidebar" => '', "primary_font" => '', "primary_font_custom" => '' ); $theme_options = re_theme_stripslashes_deep(array_merge($theme_options, (array)get_option($themename . "_options"))); function re_theme_enqueue_scripts() { global $themename; global $theme_options; //style if($theme_options["primary_font"]!="" && $theme_options["primary_font_custom"]=="") wp_enqueue_style("google-font-primary", "//fonts.googleapis.com/css?family=" . urlencode($theme_options["primary_font"]) . (!empty($theme_options["primary_font_subset"]) ? "&subset=" . implode(",", $theme_options["primary_font_subset"]) : "")); else if($theme_options["primary_font_custom"]=="") wp_enqueue_style("google-font-raleway", "//fonts.googleapis.com/css?family=Raleway:100,300,400,500,600,700,900"); wp_enqueue_style("reset", get_template_directory_uri() . "/style/reset.css"); wp_enqueue_style("superfish", get_template_directory_uri() ."/style/superfish.css"); wp_enqueue_style("prettyPhoto", get_template_directory_uri() ."/style/prettyPhoto.css"); wp_enqueue_style("jquery-qtip", get_template_directory_uri() ."/style/jquery.qtip.css"); wp_enqueue_style("odometer", get_template_directory_uri() ."/style/odometer-theme-default.css"); wp_enqueue_style("animations", get_template_directory_uri() ."/style/animations.css"); wp_enqueue_style("main-style", get_stylesheet_uri()); if((int)$theme_options["responsive"]) wp_enqueue_style("responsive", get_template_directory_uri() ."/style/responsive.css"); else wp_enqueue_style("no-responsive", get_template_directory_uri() ."/style/no_responsive.css"); if(is_plugin_active('woocommerce/woocommerce.php')) { wp_enqueue_style("woocommerce-custom", get_template_directory_uri() ."/woocommerce/style.css"); if((int)$theme_options["responsive"]) wp_enqueue_style("woocommerce-responsive", get_template_directory_uri() ."/woocommerce/responsive.css"); else wp_dequeue_style("woocommerce-smallscreen"); if(is_rtl()) wp_enqueue_style("woocommerce-rtl", get_template_directory_uri() ."/woocommerce/rtl.css"); } wp_enqueue_style("re-streamline-small", get_template_directory_uri() ."/fonts/streamline-small/styles.css"); wp_enqueue_style("re-streamline-large", get_template_directory_uri() ."/fonts/streamline-large/styles.css"); wp_enqueue_style("re-template", get_template_directory_uri() ."/fonts/template/styles.css"); wp_enqueue_style("re-social", get_template_directory_uri() ."/fonts/social/styles.css"); wp_enqueue_style("custom", get_template_directory_uri() ."/custom.css"); //js wp_enqueue_script("jquery", false, array(), false, true); wp_enqueue_script("jquery-ui-core", false, array("jquery"), false, true); wp_enqueue_script("jquery-ui-accordion", false, array("jquery"), false, true); wp_enqueue_script("jquery-ui-tabs", false, array("jquery"), false, true); wp_enqueue_script("jquery-ui-selectmenu", false, array("jquery"), false, true); wp_enqueue_script("jquery-ui-slider", false, array("jquery"), false, true); wp_enqueue_script("jquery-ui-touch-punch", get_template_directory_uri() ."/js/jquery.ui.touch-punch.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-imagesloaded", get_template_directory_uri() . "/js/jquery.imagesloaded-packed.js", array("jquery"), false, true); wp_enqueue_script("jquery-isotope", get_template_directory_uri() ."/js/jquery.isotope.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-ba-bqq", get_template_directory_uri() ."/js/jquery.ba-bbq.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-easing", get_template_directory_uri() ."/js/jquery.easing.1.4.1.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-carouFredSel", get_template_directory_uri() ."/js/jquery.carouFredSel-6.2.1-packed.js", array("jquery"), false, true); wp_enqueue_script("jquery-touchSwipe", get_template_directory_uri() ."/js/jquery.touchSwipe.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-transit", get_template_directory_uri() ."/js/jquery.transit.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-hint", get_template_directory_uri() ."/js/jquery.hint.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-qtip", get_template_directory_uri() ."/js/jquery.qtip.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-block-ui", get_template_directory_uri() ."/js/jquery.blockUI.min.js", array("jquery"), false, true); wp_enqueue_script("jquery-prettyPhoto", get_template_directory_uri() ."/js/jquery.prettyPhoto.js", array("jquery"), false, true); wp_enqueue_script("jquery-odometer", get_template_directory_uri() ."/js/odometer.min.js", array("jquery", "theme-main" ), false, true); if(!empty($theme_options['ga_tracking_id'])) { wp_enqueue_script("google-analytics", "https://www.googletagmanager.com/gtag/js?id=" . esc_attr($theme_options["ga_tracking_id"]), array(), false, true); } wp_register_script("google-maps-v3", "//maps.google.com/maps/api/js" . ($theme_options["google_api_code"]!="" ? "?key=" . esc_attr($theme_options["google_api_code"]) . "&callback=renovateInitMap" : ""), array(), false, true); wp_register_script("google-recaptcha-v2", "https://google.com/recaptcha/api.js", array(), false, true); if(function_exists("is_customize_preview") && !is_customize_preview()) wp_enqueue_script("theme-main", get_template_directory_uri() ."/js/main.js", array("jquery", "jquery-ui-core", "jquery-ui-accordion", "jquery-ui-tabs"), false, true); if(!empty($theme_options['ga_tracking_id'])) { $inline_script = "window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '" . $theme_options['ga_tracking_id'] . "');"; wp_add_inline_script("google-analytics", $inline_script); } if(!empty($theme_options['ga_tracking_code'])) { $inline_script = $theme_options['ga_tracking_code']; wp_add_inline_script("jquery", $inline_script); } //ajaxurl $data["ajaxurl"] = admin_url("admin-ajax.php"); //themename $data["themename"] = $themename; //home url $data["home_url"] = esc_url(get_home_url()); //is_rtl $data["is_rtl"] = ((is_rtl() || $theme_options["direction"]=='rtl') && ((isset($_COOKIE["re_direction"]) && $_COOKIE["re_direction"]!="LTR") || !isset($_COOKIE["re_direction"]))) || (isset($_COOKIE["re_direction"]) && $_COOKIE["re_direction"]=="RTL") ? 1 : 0; //pass data to javascript $params = array( 'l10n_print_after' => 'config = ' . json_encode($data) . ';' ); wp_localize_script("theme-main", "config", $params); } add_action("wp_enqueue_scripts", "re_theme_enqueue_scripts", 12); //function to display number of posts function re_getPostViews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count=='') { delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); } return (int)$count; } //function to count views function re_setPostViews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count=='') { delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, 1); } else { $count++; update_post_meta($postID, $count_key, $count); } } function re_get_time_iso8601() { $offset = get_option('gmt_offset'); $timezone = ($offset < 0 ? '-' : '+') . (abs($offset)<10 ? '0'.abs($offset) : abs($offset)) . '00' ; return get_the_time('Y-m-d\TH:i:s') . $timezone; } function re_theme_direction() { global $wp_locale, $theme_options; if(isset($theme_options['direction']) || (isset($_COOKIE["re_direction"]) && ($_COOKIE["re_direction"]=="LTR" || $_COOKIE["re_direction"]=="RTL"))) { if($theme_options['direction']=='default' && empty($_COOKIE["re_direction"])) return; $wp_locale->text_direction = ($theme_options['direction']=='rtl' && ((isset($_COOKIE["re_direction"]) && $_COOKIE["re_direction"]!="LTR") || !isset($_COOKIE["re_direction"])) || (isset($_COOKIE["re_direction"]) && $_COOKIE["re_direction"]=="RTL") ? 'rtl' : 'ltr'); } } add_action("after_setup_theme", "re_theme_direction"); //renovate get_font_subsets function re_ajax_get_font_subsets() { if($_POST["font"]!="") { $subsets = ''; $fontExplode = explode(":", $_POST["font"]); $subsets_array = re_get_google_font_subset($fontExplode[0]); foreach($subsets_array as $subset) $subsets .= ''; echo "re_start" . $subsets . "re_end"; } exit(); } add_action('wp_ajax_renovate_get_font_subsets', 're_ajax_get_font_subsets'); /** * Returns array of Google Fonts * @return array of Google Fonts */ function re_get_google_fonts() { //get google fonts $fontsArray = get_option("renovate_google_fonts"); //update if option doesn't exist or it was modified more than 2 weeks ago if($fontsArray===FALSE || count((array)$fontsArray)==0 || (time()-$fontsArray->last_update>2*7*24*60*60)) { $google_api_url = 'https://quanticalabs.com/.tools/GoogleFont/font.txt'; $fontsJson = wp_remote_retrieve_body(wp_remote_get($google_api_url, array('sslverify' => false))); $fontsArray = json_decode($fontsJson); if(isset($fontsArray)) { $fontsArray->last_update = time(); update_option("renovate_google_fonts", $fontsArray); } } return $fontsArray; } /** * Returns array of subsets for provided Google Font * @param type $font - Google font * @return array of subsets for provided Google Font */ function re_get_google_font_subset($font) { $subsets = array(); //get google fonts $fontsArray = re_get_google_fonts(); $fontsCount = count($fontsArray->items); for($i=0; $i<$fontsCount; $i++) { if($fontsArray->items[$i]->family==$font) { for($j=0, $max=count($fontsArray->items[$i]->subsets); $j<$max; $j++) { $subsets[] = $fontsArray->items[$i]->subsets[$j]; } break; } } return $subsets; } /** * Includes a theme file, supports child themes. * * @param string $file - file path relative to theme root directory. */ function re_get_theme_file($file) { if(file_exists($file_path = get_stylesheet_directory() . $file)) require_once($file_path); else require_once(get_template_directory() . $file); } function re_get_page_by_title($title, $post_type = "page") { $posts = get_posts(array( 'post_type' => $post_type, 'title' => $title, 'post_status' => 'all', 'numberposts' => 1 )); if(!empty($posts)) { return $posts[0]; } else { return null; } } ?>

OUR MISSION

Our mission is simple yet profound: to pave the way for a sustainable future through innovation, integrity, and environmental responsibility. We strive to continuously improve our processes and products to contribute positively to the communities we serve and the planet we call home.

 

OUR VISION

Most diverse concrete block manufacturing company in Bangladesh.