• Resolved John

    (@dsl225)


    Hello,

    I just started and my functions file contains this:

    if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
        function chld_thm_cfg_locale_css( $uri ){
            if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
                $uri = get_template_directory_uri() . '/rtl.css';
            return $uri;
        }
    endif;
    add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
    
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap','jquery-bxslider' ) );
        }
    endif;

    Is it safe to deactivate the plugin after that, because I see references to ‘chld_thm_cfg_locale_css’ and a stylesheet ‘/rtl.css’ that is not in my parent theme.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author lilaeamedia

    (@lilaeamedia)

    Yes, it is safe. This is exactly why CTC generates the php code: so that the child theme is independent of the plugin.

    The only font end action that is hooked by the plugin is a version so that it can break caching while you are working on it. Once you are done you can safely remove the plugin.

    Thread Starter John

    (@dsl225)

    Great, many thanks for this!
    Just curious: what is this stylesheet ‘/rtl.css’ that is not in my parent theme?

    Plugin Author lilaeamedia

    (@lilaeamedia)

    rtl.css is the stylesheet WordPress loads to accommodate right-to-left languages such as Hebrew and Arabic.

    When WordPress detects a child theme, it automatically assumes rtl.css is located in the child theme directory.

    In most cases, WordPress gracefully falls back to the parent theme’s version of a file.

    Unfortunately, this is not the case with rtl.css, so CTC adds a block of code to add this fallback functionality.

    Thread Starter John

    (@dsl225)

    Interesting!
    Thanks for the clarification.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Safe to deactivate plugin?’ is closed to new replies.