Hooks for: custom, laconica, UA specific stylesheets
This commit is contained in:
parent
47e595b092
commit
070d1a3f24
18
EVENTS.txt
18
EVENTS.txt
|
@ -15,6 +15,24 @@ StartSecondaryNav: Showing the secondary nav menu
|
||||||
EndSecondaryNav: At the end of the secondary nav menu
|
EndSecondaryNav: At the end of the secondary nav menu
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
|
StartShowStyles: Showing Style links; good place to add UA style resets
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowStyles: End showing Style links; good place to add custom styles
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
StartShowLaconicaStyles: Showing Laconica Style links
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowLaconicaStyles: End showing Laconica Style links; good place to add handheld or JavaScript dependant styles
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
StartShowUAStyles: Showing custom UA Style links
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
|
EndShowUAStyles: End showing custom UA Style links; good place to add user-agent (e.g., filter, -webkit, -moz) specific styles
|
||||||
|
- $action: the current action
|
||||||
|
|
||||||
StartShowScripts: Showing JavaScript links
|
StartShowScripts: Showing JavaScript links
|
||||||
- $action: the current action
|
- $action: the current action
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,8 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
*/
|
*/
|
||||||
function showStylesheets()
|
function showStylesheets()
|
||||||
{
|
{
|
||||||
|
if (Event::handle('StartShowStyles', array($this))) {
|
||||||
|
if (Event::handle('StartShowLaconicaStyles', array($this))) {
|
||||||
$this->element('link', array('rel' => 'stylesheet',
|
$this->element('link', array('rel' => 'stylesheet',
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION,
|
'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION,
|
||||||
|
@ -159,6 +161,9 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
'type' => 'text/css',
|
'type' => 'text/css',
|
||||||
'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION,
|
'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION,
|
||||||
'media' => 'screen, projection, tv'));
|
'media' => 'screen, projection, tv'));
|
||||||
|
Event::handle('EndShowLaconicaStyles', array($this));
|
||||||
|
}
|
||||||
|
if (Event::handle('StartShowUAStyles', array($this))) {
|
||||||
$this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
|
$this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
|
||||||
'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
|
'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
|
||||||
foreach (array(6,7) as $ver) {
|
foreach (array(6,7) as $ver) {
|
||||||
|
@ -170,6 +175,10 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
}
|
}
|
||||||
$this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
|
$this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
|
||||||
'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]');
|
'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]');
|
||||||
|
Event::handle('EndShowUAStyles', array($this));
|
||||||
|
}
|
||||||
|
Event::handle('EndShowStyles', array($this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user