[wp-hackers] Re: Plugins & CSS, embeded vs linking
Joost de Valk
joost at joostdevalk.nl
Mon Jul 14 18:23:05 GMT 2008
On Jul 14, 2008, at 8:20 PM, Aaron Brazell wrote:
> What's wrong with wp_head? That's a standard hook in the header. Of
> course,
> there's nothing that enforces a theme developer put the wp_head()
> function
> before the closing </head> but most do I think.
>
> function plugin_css()
> {
> echo '<link rel="stylesheet" href="' . ABSPATH .
> '/wp-content/plugin/your-very-nice-plugin/customstyle.css"
> type="text/css"
> />';
> }
> add_action('wp_head','plugin_css');
>
I know that's what I do, get's you multiple linked files though... If
there were a mechanism in which you could add some css, and that would
ALL be added to 1 big css file, that'd save a couple of includes. But
anyway, Jonathan had a problem with it, I don't :)
Cheers,
Joost
> On Mon, Jul 14, 2008 at 2:09 PM, Joost de Valk
> <joost at joostdevalk.nl> wrote:
>
>> if there were a way to make an action hook, with which you could
>> add some
>> css... But that would mean having a PHP generated style sheet
>> somewhere...
>>
>> --
>> Joost de Valk
>> http://yoast.com/
>>
>> P.S. Join my WordPress Plugin & SEO mailing list, and I'll teach
>> you all I
>> know! Just go to:
>>
>> http://yoast.com/mailing-list/
>> ...to get weekly WordPress Plugin news, SEO tips for your blog and
>> more!
>>
>>
>> On Jul 14, 2008, at 7:41 PM, Jonathan Dingman wrote:
>>
>> Joost,
>>>
>>> Ah, gotcha. So, that said, it's laziness, yes I realize that. But,
>>> is there a standard we might be able to impose so that this doesn't
>>> happen? Maybe even something within the WP Core for plugin devs to
>>> utilize?
>>>
>>> I just feel there has to be a better way to do it than how it's
>>> currently being done...
>>>
>>> Sincerely,
>>>
>>> Jonathan Dingman
>>>
>>> http://www.ginside.com
>>> http://www.wordcampny.org - Oct 5th, 2008
>>>
>>> Are you following? http://www.twitter.com/dingman
>>>
>>> On Jul 14, 1:34 pm, Joost de Valk <jo... at joostdevalk.nl> wrote:
>>>
>>>> Sociable adds a stylesheet, and doesn't even do that by default...
>>>> Easy enough to code... Just laziness on the Plugin writers side.
>>>>
>>>> Cheers,
>>>> Joost
>>>>
>>>> Sent from my iPod, optimized for short messages, not for prose
>>>>
>>>> http://yoast.com/http://twitter.com/jdevalk
>>>>
>>>> On Jul 14, 2008, at 19:29, "Jonathan Dingman" <jding... at gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Time after time, I get more annoyed with plugins forcing me to
>>>> embed
>>>>> CSS.
>>>>> There ought to be a way to easily offer an option to link to a
>>>>> stylesheet
>>>>> rather than forcing me to embed the CSS.
>>>>> Even offering an option to "disable embedded CSS" and I'll add it
>>>>> myself,
>>>>> even that would be fine. but it seems like every plugin that
>>>>> uses CSS
>>>>> forces uses to embed CSS, or nearly every plugin.
>>>>>
>>>>
>>>> anyone else have thoughts on this subject?
>>>>>
>>>>
>>>> Sincerely,
>>>>>
>>>>
>>>> Jonathan Dingman
>>>>>
>>>>
>>>> http://www.ginside.com
>>>>> http://www.nextwebonline.com
>>>>> http://www.wordcampny.org- Oct 5th, 2008
>>>>>
>>>>
>>>> Are you following?http://www.twitter.com/dingman
>>>>> _______________________________________________
>>>>> wp-hackers mailing list
>>>>> wp-hack... at lists.automattic.com
>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>>
>>>>
>>>> _______________________________________________
>>>> wp-hackers mailing list
>>>> wp-hack... at lists.automattic.comhttp://
>>>> lists.automattic.com/mailman/listinfo/wp-hackers
>>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
>
> --
> --
> Aaron Brazell
> web:: www.technosailor.com
> phone:: 410-608-6620
> skype:: technosailor
> twitter:: @technosailor
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list