get_theme_root_uri example



/** * Retrieves stylesheet directory URI for the active theme. * * @since 1.5.0 * * @return string URI to active theme's stylesheet directory. */
function get_stylesheet_directory_uri() {
    $stylesheet         = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
    $theme_root_uri     = get_theme_root_uri( $stylesheet );
    $stylesheet_dir_uri = "$theme_root_uri/$stylesheet";

    /** * Filters the stylesheet directory URI. * * @since 1.5.0 * * @param string $stylesheet_dir_uri Stylesheet directory URI. * @param string $stylesheet Name of the activated theme's directory. * @param string $theme_root_uri Themes root URI. */
    
return $this->get_screenshot( 'relative' );
            // 'author' and 'description' did not previously return translated data.             case 'description':
                return $this->display( 'Description' );
            case 'author':
                return $this->display( 'Author' );
            case 'tags':
                return $this->get( 'Tags' );
            case 'theme_root':
                return $this->get_theme_root();
            case 'theme_root_uri':
                return $this->get_theme_root_uri();
            // For cases where the array was converted to an object.             default:
                return $this->offsetGet( $offset );
        }
    }

    /** * Method to implement ArrayAccess for keys formerly returned by get_themes() * * @since 3.4.0 * * @param mixed $offset * @param mixed $value */
Home | Imprint | This part of the site doesn't use cookies.