예제 #1
0
/**
 * Delete all theme settings.
 *
 * @return bool
 * @since 1.0
 */
function momtaz_delete_settings()
{
    if (!delete_option(momtaz_theme_settings_option())) {
        return false;
    }
    unset(momtaz()->settings);
    return true;
}
예제 #2
0
     * @param string $path The path relative to the Momtaz directory.
     * @uses get_template_directory() Get system path to theme template directory.
     * @return string
     * @since 1.2
     */
    public static function path($path = '')
    {
        $path = ltrim($path, '/');
        $dir = get_template_directory();
        return trailingslashit($dir) . $path;
    }
}
/**
 * The main function responsible for returning the one true Momtaz Instance
 * to functions everywhere.
 *
 * Use this function like you would a global variable, except without needing
 * to declare the global.
 *
 * Example: <?php $momtaz = momtaz() ?>
 *
 * @return The one true Momtaz Instance
 * @since 1.0
 */
function momtaz()
{
    return Momtaz::instance();
}
// Fire it up!
momtaz();