]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
hooks for showing <title> and <h1> elements
authorEvan Prodromou <evan@status.net>
Thu, 2 Sep 2010 21:10:25 +0000 (17:10 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 2 Sep 2010 21:10:25 +0000 (17:10 -0400)
EVENTS.txt
lib/action.php

index 1a3b2594a2efe55ef5be80810e1321c76385ee99..65e2c3ce0385de7c153e739e06597a9a6d676e83 100644 (file)
@@ -1066,3 +1066,15 @@ EndRssEntryArray: at the end of copying a notice to an array
 
 NoticeDeleteRelated: at the beginning of deleting related fields to a notice
 - $notice: notice being deleted
+
+StartShowHeadTitle: when beginning to show the <title> element
+- $action: action being shown
+
+EndShowHeadTitle: when done showing the <title>
+- $action: action being shown
+
+StartShowPageTitle: when beginning to show the page title <h1>
+- $action: action being shown
+
+EndShowPageTitle: when done showing the page title <h1>
+- $action: action being shown
\ No newline at end of file
index 2b3b707c5968f88ed72013a3c40e39b2fdfa8a49..1d85f19e9925fc920362cebaeef06c4b754a1fdb 100644 (file)
@@ -121,7 +121,10 @@ class Action extends HTMLOutputter // lawsuit
         // XXX: attributes (profile?)
         $this->elementStart('head');
         if (Event::handle('StartShowHeadElements', array($this))) {
-            $this->showTitle();
+            if (Event::handle('StartShowHeadTitle', array($this))) {
+                $this->showTitle();
+                Event::handle('EndShowHeadTitle', array($this));
+            }
             $this->showShortcutIcon();
             $this->showStylesheets();
             $this->showOpenSearch();
@@ -235,7 +238,7 @@ class Action extends HTMLOutputter // lawsuit
                 Event::handle('EndShowDesign', array($this));
             }
             Event::handle('EndShowStyles', array($this));
-            
+
             if (common_config('custom_css', 'enabled')) {
                 $css = common_config('custom_css', 'css');
                 if (Event::handle('StartShowCustomCss', array($this, &$css))) {
@@ -616,7 +619,10 @@ class Action extends HTMLOutputter // lawsuit
     function showContentBlock()
     {
         $this->elementStart('div', array('id' => 'content'));
-        $this->showPageTitle();
+        if (Event::handle('StartShowPageTitle', array($this))) {
+            $this->showPageTitle();
+            Event::handle('EndShowPageTitle', array($this));
+        }
         $this->showPageNoticeBlock();
         $this->elementStart('div', array('id' => 'content_inner'));
         // show the actual content (forms, lists, whatever)