onetone_option_name
The Onetone onetone option name function.
Description
onetone_option_name();
Usage
if ( !function_exists( 'onetone_option_name' ) ) { require_once '/includes/theme-functions.php'; } // NOTICE! Understand what this does before running. $result = onetone_option_name();
Defined (1)
The function is defined in the following location(s).
- /includes/theme-functions.php
- function onetone_option_name() {
- $themename = get_option( 'stylesheet' );
- $themename = preg_replace("/\W/", "_", strtolower($themename) );
- if( is_child_theme() ) {
- $themename = str_replace("_child", "", $themename ) ;
- }
- $themename_lan = $themename;
- if( defined('ICL_LANGUAGE_CODE') && ICL_LANGUAGE_CODE != 'en' )
- $themename_lan = $themename.'_'.ICL_LANGUAGE_CODE;
- if(function_exists('pll_current_language')) {
- $default_lan = pll_default_language('slug');
- $current_lan = pll_current_language('slug');
- if($current_lan !='')
- $themename_lan = $themename.'_'.$current_lan;
- }
- return $themename_lan;
- }