0

where can i find the file responsible for calling the Css files and test if their links are http or https ?

i want to test the request if https, if so it's good to go and if not change it to https

in Functions.php i have found the function responsible on calling the theme Css, here is its code :

if (!function_exists('jobcareer_front_scripts')) {

    function jobcareer_front_scripts() {
        global $jobcareer_options;
        if (!is_admin()) {
            /*
             * Css Files
             */
            wp_enqueue_style('jobcareer_iconmoon_css', trailingslashit(get_template_directory_uri()) . 'assets/css/iconmoon.css');
            wp_enqueue_style('cs_bootstrap_css', trailingslashit(get_template_directory_uri()) . 'assets/css/bootstrap.css');
            wp_enqueue_style('jobcareer_style_css', get_stylesheet_directory_uri() . '/style.css');
            wp_enqueue_style('jobcareer_nav-icon', trailingslashit(get_template_directory_uri()) . 'assets/css/nav-icon.css');
            wp_enqueue_style('jobcareer_top-menu', trailingslashit(get_template_directory_uri()) . 'assets/css/top-menu.css');
            wp_enqueue_style('cs_slicknav_css', trailingslashit(get_template_directory_uri()) . 'assets/css/slicknav.css');
            wp_enqueue_style('jobcareer_widgets_css', trailingslashit(get_template_directory_uri()) . 'assets/css/widget.css');
            wp_enqueue_style('jobcareer_prettyPhoto', trailingslashit(get_template_directory_uri()) . 'assets/css/prettyPhoto.css');
            if (class_exists('WooCommerce')) {
                wp_enqueue_style('cs-woocommerce', trailingslashit(get_template_directory_uri()) . 'assets/css/cs-woocommerce.css');
            }

            // color style 
            $custom_style_ver = (isset($jobcareer_options['jobcareer_theme_option_save_flag'])) ? $jobcareer_options['jobcareer_theme_option_save_flag'] : '';
            wp_enqueue_style('jobcareer_custom_style_css', trailingslashit(get_template_directory_uri()) . 'assets/css/custom-style.css', '', $custom_style_ver);

            /*
             * Js Files
             * 
             */

            if (isset($jobcareer_options['cs_maintenance_page_switch']) and $jobcareer_options['cs_maintenance_page_switch'] == 'on') {
                wp_enqueue_script('jobcareer_addthis_widget_js', '' . cs_server_protocol() . 's7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e4412d954dccc64', '', '', true);
            }
            wp_enqueue_script('cs_bootstrap_min_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/bootstrap.min.js', array('jquery'), '', true);
            wp_enqueue_script('jobcareer_modernizr_min_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/modernizr.min.js', '', '', true);
            wp_enqueue_script('jobcareer_browser_detect_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/browser-detect.js', '', '', true);
            wp_enqueue_script('cs_slick_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/slick.js', '', '', true);
            wp_enqueue_script('jobcareer_jquery_sticky_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.sticky.js', '', '', true);
            wp_enqueue_script('jobcareer_map_styles', trailingslashit(get_template_directory_uri()) . 'assets/scripts/cs_map_styles.js', '', '', true);
            wp_enqueue_script('jobcareer_functions_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/functions.js', '', '', true);
            wp_enqueue_script('jobcareer_menu_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/menu.js', '', '', true);
            wp_enqueue_script('jobcareer_prettyPhoto_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.prettyPhoto.js', '', '', true);
            wp_enqueue_script('jobcareer_lightbox_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/lightbox.js', '', '', true);

            if (is_singular() && get_option('thread_comments') && get_comments_number()) {
                wp_enqueue_script('comment-reply');
            }

            /*
             * Include scroll js enqueue files functions 
             */
            if (!function_exists('jobcareer_scrolltofix')) {

                function jobcareer_scrolltofix() {
                    wp_enqueue_script('jobcareer_sticky_header_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/sticky_header.js', '', '', true);
                }

            }

            /*
             * Include scroll js enqueue files functions 
             */
            if (!function_exists('jobcareer_jquery_easing_js')) {

                function jobcareer_jquery_easing_js() {
                    wp_enqueue_script('jobcareer_jquery_easing_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.easing.1.3.js', '', '', true);
                }

            }

            // Start Include  Counter Script enqueue files functions 
            if (!function_exists('jobcareer_counter_script')) {

                function jobcareer_counter_script() {
                    wp_enqueue_script('jobcareer_counter_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/counter.js', '', '', true);
                }

            }

            /*
             *  Include slick Script enqueue files functions 
             */
            if (!function_exists('jobcareer_enqueue_slick_script')) {

                function jobcareer_enqueue_slick_script() {
                    wp_enqueue_script('cs_slick_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/slick.js', '', '', true);
                }

            }

            /*
             * Start Include Count Script enqueue files functions 
             */
            if (!function_exists('jobcareer_enqueue_count_nos')) {

                function jobcareer_enqueue_count_nos() {
                    wp_enqueue_script('jobcareer_countTo_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.countTo.js', '', '', true);
                    wp_enqueue_script('jobcareer_inview_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.inview.min.js', '', '', true);
                }

            }

            /*
             * Start Include Ticker enqueue files functions 
             */
            if (!function_exists('jobcareer_news_ticker_script')) {

                function jobcareer_news_ticker_script() {
                    wp_enqueue_script('jobcareer_news_ticker_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/ticker.js', '', '', true);
                }

            }
            /*
             *  End Include Ticker enqueue files functions 
             */

            if (!function_exists('jobcareer_google_map_script')) {

                function jobcareer_google_map_script() {
                    global $jobcareer_options;
                    $google_api_key = '?libraries=places';
                    if (isset($jobcareer_options['cs_googleapi_key']) && $jobcareer_options['cs_googleapi_key'] != '') {
                        $google_api_key = '?key=' . $jobcareer_options['cs_googleapi_key'] . '&libraries=places';
                    }
                    wp_enqueue_script('cs_google_autocomplete_script', 'https://maps.googleapis.com/maps/api/js' . $google_api_key);
                }

            }

            // Start Include Slide Menu enqueue files functions
            if (!function_exists('jobcareer_sliiide_menu')) {

                function jobcareer_sliiide_menu() {
                    wp_enqueue_script('jobcareer_sliiide_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/sliiide.js', '', '', true);
                    wp_enqueue_script('jobcareer_nav-icon_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/nav-icon.js', '', '', true);
                    wp_enqueue_script('jobcareer_jquery.slicknav_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.slicknav.js', '', '', true);
                }

            }

            /*
             * Start Add this soocial sharing enqueue Script
             */
            if (!function_exists('jobcareer_addthis_script_init_method')) {

                function jobcareer_addthis_script_init_method() {
                    wp_enqueue_script('jobcareer_addthis_widget_js', '' . cs_server_protocol() . 's7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e4412d954dccc64');
                }

            }

            if (!function_exists('jobcareer_dynamic_scripts')) {

                function jobcareer_dynamic_scripts($cs_js_key, $cs_arr_key, $cs_js_code) {
                    // Register the script
                    wp_register_script('jobcareer_dynamic_scripts', trailingslashit(get_template_directory_uri()) . 'assets/scripts/cs_inline_scripts_functions.js', '', '', true);


                    // Localize the script
                    $cs_code_array = array(
                        $cs_arr_key => $cs_js_code
                    );
                    wp_localize_script('jobcareer_dynamic_scripts', $cs_js_key, $cs_code_array);
                    wp_enqueue_script('jobcareer_dynamic_scripts');

                    wp_enqueue_style('jobcareer_dynamic_scripts');
                }

            }

            if (!function_exists('jobcareer_gallery_masonry')) {

                function jobcareer_gallery_masonry() {
                    wp_enqueue_script('jobcareer_init_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/init.js', '', '', true);
                    wp_enqueue_script('jobcareer_freetile_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/jquery.freetile.js', '', '', true);
                    wp_enqueue_script('jobcareer_masonry_pkgd_min_js', trailingslashit(get_template_directory_uri()) . 'assets/scripts/masonry.pkgd.min.js', '', '', true);
                }

            }
        }
        jobcareer_inline_styles_method();
    }

}

Thank you

9
  • 1
    There isn't a single file responsible for enqueing CSS, the answer will be different depending on which CSS file you're referring to, and which plugin/theme it belongs to. Generally, all assets should be HTTPS to avoid mixed content errors
    – Tom J Nowell
    Aug 4 at 12:45
  • im referring to the theme Css
    – Norman
    Aug 4 at 13:04
  • @TomJNowell i have found the file Functions.php and now how can i please check if this function function jobcareer_front_scripts() called https or http, cause i need all css links to be https. Thank you
    – Norman
    Aug 4 at 13:38
  • You would need to share the code for that function in your question, use the edit link under the tags to update it and add the info in a code block
    – Tom J Nowell
    Aug 4 at 13:55
  • Noting that this is related to wordpress.stackexchange.com/questions/392867/…
    – Tom J Nowell
    Aug 4 at 13:59
0

You Just change the http to httpsin your site_url and home_url field in the wp_options table.

Hope it will works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.