diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-07-29 17:25:53 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-29 17:25:53 -0700 |
commit | 15f148349e8dd9145d33fbdbc85142b9a864b6ed (patch) | |
tree | 011d3b65c4734fdcf586f3670756508506c78561 | |
parent | ca96d4719608d4a8a62457ecf3e54ac8ca29629a (diff) |
Make body_attributes() a theme callback instead of a method on the
View. This allows modules to piggyback on it.
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 6 | ||||
-rw-r--r-- | modules/gallery/libraries/Admin_View.php | 1 | ||||
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 7 | ||||
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index 998eb289..81b22b74 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -127,4 +127,10 @@ class gallery_theme_Core { static function admin_credits() { return gallery_theme::credits(); } + + public function body_attributes() { + if (locales::is_rtl()) { + return 'class="rtl"'; + } + } }
\ No newline at end of file diff --git a/modules/gallery/libraries/Admin_View.php b/modules/gallery/libraries/Admin_View.php index 5c3fe081..21b70df6 100644 --- a/modules/gallery/libraries/Admin_View.php +++ b/modules/gallery/libraries/Admin_View.php @@ -78,6 +78,7 @@ class Admin_View_Core extends Gallery_View { case "admin_page_bottom": case "admin_page_top": case "admin_head": + case "body_attributes": $blocks = array(); foreach (module::active() as $module) { $helper_class = "{$module->name}_theme"; diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index 43783158..eb55aca6 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -42,11 +42,4 @@ class View extends View_Core { return ""; } } - - public function body_attributes() { - if (locales::is_rtl()) { - return 'class="rtl"'; - } - return ''; - } } diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 786ed1ce..360e5e46 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -156,6 +156,7 @@ class Theme_View_Core extends Gallery_View { case "album_blocks": case "album_bottom": case "album_top": + case "body_attributes": case "credits"; case "dynamic_bottom": case "dynamic_top": |