コード例 #1
0
ファイル: style.php プロジェクト: forthrobot/inuvik
/**
 * Adds a stylesheet to the queue to be included
 *
 *
 * @since 1.4
 *
 * @param string $handle Reference name for the stylesheet
 * @param string $src (optional) Path to the stylesheet
 * @param array $deps (optional) List of registered stylesheet handles that this stylesheet depends on
 * @param string $ver The version number of the stylesheet for proper cache handling
 * @param string $media (optional) The media type for the stylesheet
 * @return void
 **/
function shopp_enqueue_style($handle, $src = false, $deps = array(), $ver = false, $media = 'all')
{
    global $ShoppStyles;
    if (!is_a($ShoppStyles, 'ShoppStyles')) {
        $ShoppStyles = new ShoppStyles();
    }
    if ($src) {
        list($name, ) = explode('?', $handle);
        $ShoppStyles->add($name, $src, $deps, $ver);
    }
    $ShoppStyles->enqueue($handle);
}