osc_count_categories()

osc_count_categories()

Gets the total of categories. If categories are not loaded, this function will load them.

Code osc_count_categories():


    function osc_count_categories() {
        if ( !View::newInstance()->_exists('categories') ) {
            View::newInstance()->_exportVariableToView('categories', Category::newInstance()->toTree() );
        }
        return osc_priv_count_categories();
    }

    /**
     *
     * @return int
     */