Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6688089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:21:50+00:00 2026-05-26T05:21:50+00:00

i have a definition like : define(‘LIBRARIES_URI’, get_template_directory_uri() . ‘/libraries/’); Now, i have an

  • 0

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;
  }  


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:21:51+00:00Added an answer on May 26, 2026 at 5:21 am

    Class attribute declarations may not contain expressions, only literal/constant values.

    Move your assignment into the constructor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a definition like this def bar(self, foo=None, bar=None, baz=None): pass I want
If I have a service definition/implementation like this: using System; using System.ServiceModel; namespace aspace.service
Let's say I have an object who's class definition looks like: class Command: foo
I have a macro definition in header file like this: // header.h ARRAY_SZ(a) =
I have a bash script file which starts with a function definition, like this:
Is it possible to define a spring-managed EJB3 hibernate listener? I have this definition
I have a class definition like: class JConfig { var $offline = '0'; var
I have a situation where I'd like to do something like... (define (def a
Suppose I have an IQueryable<T> expression that I'd like to encapsulate the definition of,
I have a class definition that looks like this: public class SolrObj { [SolrUniqueKey(id)]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.