Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enqueuing fw stylesheet #4

Closed
ghost opened this issue Sep 12, 2014 · 4 comments
Closed

enqueuing fw stylesheet #4

ghost opened this issue Sep 12, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Sep 12, 2014

i'm working on rtl-support version of the framework and i have finished customizing the new fw-rtl.css.
I found that in framework/core/components/backend.php the scripts and styles are registered but i can't find where it was enqueued
I hope to understand my english :)

@sergiubagrin sergiubagrin reopened this Sep 12, 2014
@ghost ghost reopened this Sep 12, 2014
@ghost
Copy link
Author

ghost commented Sep 12, 2014

If you want to enqueue a stylesheet or javascript that is needed only for your theme, add to framework-customizations/theme/static.php your wp_enqueue_style|script(...).

The static.php file is included on bothwp_enqueue_scripts and admin_enqueue_scripts actions.

To enqueue only in admin area or only on frontend, you should use the is_admin() function:

if (is_admin()) {
    wp_enqueue_script('my-admin-script', ...);
} else {
    wp_enqueue_script('my-front-end-script', ...);
}

If I understand correctly, you are working on rtl support for framework, and want to include that feature in the core.

In that case please make a pull request when you are done and we will review it.

@mohammed-manssour I found that in framework/core/components/backend.php the scripts and styles are registered but i can't find where it was enqueued

We register all scripts and styles need for backend in framework/core/components/backend.php and enqueue them only when needed. Most of them are enqueued when they are used in the deps parameter in other styles and scripts. For example here are enqueued only one script and one style, but they have many dependencies.

@ghost
Copy link
Author

ghost commented Sep 12, 2014

@moldcraft If I understand correctly, you are working on rtl support for framework, and want to include that feature in the core.

this was my purpose of the quersion

to be more specific: i can see that fw.css is loaded in the front and backend as well . but i didn't find the place where it was enqueued

for example backend-option.css is registerd and enqueued in framework/core/components/backend.php
fw,css is registered in framework/core/components/backend.php the question is where is it enqueued?

@ghost
Copy link
Author

ghost commented Sep 12, 2014

fw.css in "enqueued" here. When fw-backend-options is enqueued, it atomatically enqueues all it's dependecies.

@mohammed-manssour i can see that fw.css is loaded in the front and backend as well . but i didn't find the place where it was enqueued

Could you give us a link to a page where the fw.css in loaded in the frontend? On the demo I can't find any page where this happens.

@ghost
Copy link
Author

ghost commented Sep 12, 2014

Could you give us a link to a page where the fw.css in loaded in the frontend? On the demo I can't find any page where this happens.

my mistake it's not enqueued in the Front-end

thanks for your quick response

@ghost ghost closed this as completed Sep 12, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant