You are here

function rss_permissions_theme_registry_alter in RSS Permissions 6

Same name and namespace in other branches
  1. 7 rss_permissions.module \rss_permissions_theme_registry_alter()

Implementation of hook_theme_registry_alter to override theme_feed_icon().

In case some themes are implementing theme_feed_icon, we want to continue using that function. Save the current feed_icon theming function as a variable.

File

./rss_permissions.module, line 116

Code

function rss_permissions_theme_registry_alter(&$theme_registry) {

  // Save the current theme function as a variable.
  if (!empty($theme_registry['feed_icon']['function'])) {
    variable_set('rss_permissions_feed_icon_theme', $theme_registry['feed_icon']['function']);
  }

  // Now force our function to be used.
  $theme_registry['feed_icon']['function'] = 'theme_rss_permissions_feed_icon';
}