i have a definition like :
define('LIBRARIES_URI', get_template_directory_uri() . '/libraries/');
Now, i have an associative array like :
array( 'name' => 'superfish-css', 'path' => LIBRARIES_URI .'superfish/css/superfish.css', 'type' => 'style' )
However, path is not right, this gives me an error, because there is an expression i guess. I tried various things like double quotes and stuff, but i cannot seem to get it right without an external variable. Is there a way to correctly interpolate that ?
FULL EXAMPLE :
define('LIBRARIES_PATH', TEMPLATEPATH . '/libraries/');
class Kosmos
{
private static $inclusions = array(
array( 'name' => 'style.css', 'path' => "get_bloginfo('stylesheet_url')", 'type' => 'style' ),
array( 'name' => 'jquery', 'path' => '', 'type' => 'script' ),
array( 'name' => 'jquery-ui-core', 'path' => '', 'type' => 'script' ),
array( 'name' => 'jquery-ui-tabs', 'path' => '', 'type' => 'script' ),
array( 'name' => 'superfish-css', 'path' => LIBRARIES_URI .'superfish/css/superfish.css', 'type' => 'style' ),
array( 'name' => 'superfish-js', 'path' => "LIBRARIES_URI . 'superfish/js/superfish.js'", 'type' => 'script', 'dep' => array('jquery') ),
array( 'name' => 'superfish-hover', 'path' => "LIBRARIES_URI . 'superfish/js/hoverIntent.js'", 'type' => 'script', 'dep' => array('jquery') ),
array( 'name' => 'jquery-color', 'path' => "LIBRARIES_URI . 'horizontalMenu/jquery.color-RGBa-patch.js'", 'type' => 'script' ),
/* admin */
array( 'name' => 'admin-css', 'path' => "ADMIN_CSS_URI . 'admin.css'", 'type' => 'admin-style' ),
array( 'name' => 'tabs-js', 'path' => "LIBRARIES_URI . 'tabs/tabs.js'", 'type' => 'admin-script' )
);
private static $admin_inclusions = array();
public function inclusions() {
return self::$inclusions;
}
public function admin_inclusions() {
return self::$admin_inclusions;
}
}
No comments:
Post a Comment