diff --git a/EVENTS.txt b/EVENTS.txt index aed3dd9c5a..16ca9ea066 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -15,6 +15,24 @@ StartSecondaryNav: Showing the secondary nav menu EndSecondaryNav: At the end of the secondary nav menu - $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 - $action: the current action diff --git a/lib/action.php b/lib/action.php index 602118cdf0..cd0db53999 100644 --- a/lib/action.php +++ b/lib/action.php @@ -151,25 +151,34 @@ class Action extends HTMLOutputter // lawsuit */ function showStylesheets() { - $this->element('link', array('rel' => 'stylesheet', - 'type' => 'text/css', - 'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION, - 'media' => 'screen, projection, tv')); - $this->element('link', array('rel' => 'stylesheet', - 'type' => 'text/css', - 'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION, - 'media' => 'screen, projection, tv')); - $this->comment('[if IE]>comment('[if lte IE '.$ver.']>element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION, + 'media' => 'screen, projection, tv')); + $this->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION, + 'media' => 'screen, projection, tv')); + Event::handle('EndShowLaconicaStyles', array($this)); } + if (Event::handle('StartShowUAStyles', array($this))) { + $this->comment('[if IE]>comment('[if lte IE '.$ver.']>comment('[if IE]>comment('[if IE]>