- Patch #13443 by Moshe: got rid of the semi-implemented 'page link' feature. All themes currently support primary and secondary links so page links are now deprecated. Check your contributed modules and update them accordingly.
parent
4e4e2aa777
commit
4726c93156
|
@ -107,15 +107,6 @@ function aggregator_perm() {
|
|||
return array('administer news feeds', 'access news feeds');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function aggregator_link($type) {
|
||||
if ($type == 'page' && user_access('access news feeds')) {
|
||||
return array(l(t('news feeds'), 'aggregator', array('title' => t('Read the latest news from syndicated web sites.'))));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -107,15 +107,6 @@ function aggregator_perm() {
|
|||
return array('administer news feeds', 'access news feeds');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function aggregator_link($type) {
|
||||
if ($type == 'page' && user_access('access news feeds')) {
|
||||
return array(l(t('news feeds'), 'aggregator', array('title' => t('Read the latest news from syndicated web sites.'))));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -189,18 +189,6 @@ function archive_block($op = 'list', $delta = 0) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function archive_link($type) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('archives'), 'archive', array('title' => t('Read the older content in our archive.')));
|
||||
}
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -189,18 +189,6 @@ function archive_block($op = 'list', $delta = 0) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function archive_link($type) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('archives'), 'archive', array('title' => t('Read the older content in our archive.')));
|
||||
}
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -256,10 +256,6 @@ function blog_view(&$node, $teaser = FALSE, $page = FALSE) {
|
|||
function blog_link($type, $node = 0, $main) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('blogs'), 'blog', array('title' => t('Read the latest blog entries.')));
|
||||
}
|
||||
|
||||
if ($type == 'node' && $node->type == 'blog') {
|
||||
if (arg(0) != 'blog' && arg(1) != $node->uid) {
|
||||
$links[] = l(t("%username's blog", array('%username' => $node->name)), "blog/$node->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $node->name))));
|
||||
|
|
|
@ -256,10 +256,6 @@ function blog_view(&$node, $teaser = FALSE, $page = FALSE) {
|
|||
function blog_link($type, $node = 0, $main) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('blogs'), 'blog', array('title' => t('Read the latest blog entries.')));
|
||||
}
|
||||
|
||||
if ($type == 'node' && $node->type == 'blog') {
|
||||
if (arg(0) != 'blog' && arg(1) != $node->uid) {
|
||||
$links[] = l(t("%username's blog", array('%username' => $node->name)), "blog/$node->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $node->name))));
|
||||
|
|
|
@ -59,10 +59,6 @@ function book_link($type, $node = 0, $main = 0) {
|
|||
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('books'), 'book', array('title' => t('Read and contribute to the collaborative books.')));
|
||||
}
|
||||
|
||||
if ($type == 'node' && $node->type == 'book') {
|
||||
if (!$main) {
|
||||
if (book_access('create', $node)) {
|
||||
|
@ -82,6 +78,8 @@ function book_menu($may_cache) {
|
|||
$items = array();
|
||||
|
||||
if ($may_cache) {
|
||||
$items[] = array('path' => 'book', 'title' => t('books'),
|
||||
'access' => user_access('access content'), 'type' => MENU_NORMAL_ITEM, 'weight' => 5);
|
||||
$items[] = array('path' => 'node/add/book', 'title' => t('book page'),
|
||||
'access' => user_access('create book pages'));
|
||||
$items[] = array('path' => 'admin/node/book', 'title' => t('books'),
|
||||
|
|
|
@ -59,10 +59,6 @@ function book_link($type, $node = 0, $main = 0) {
|
|||
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('books'), 'book', array('title' => t('Read and contribute to the collaborative books.')));
|
||||
}
|
||||
|
||||
if ($type == 'node' && $node->type == 'book') {
|
||||
if (!$main) {
|
||||
if (book_access('create', $node)) {
|
||||
|
@ -82,6 +78,8 @@ function book_menu($may_cache) {
|
|||
$items = array();
|
||||
|
||||
if ($may_cache) {
|
||||
$items[] = array('path' => 'book', 'title' => t('books'),
|
||||
'access' => user_access('access content'), 'type' => MENU_NORMAL_ITEM, 'weight' => 5);
|
||||
$items[] = array('path' => 'node/add/book', 'title' => t('book page'),
|
||||
'access' => user_access('create book pages'));
|
||||
$items[] = array('path' => 'admin/node/book', 'title' => t('books'),
|
||||
|
|
|
@ -159,10 +159,6 @@ function forum_link($type, $node = 0, $main = 0) {
|
|||
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('forums'), 'forum');
|
||||
}
|
||||
|
||||
if (!$main && $type == 'node' && $node->type == 'forum') {
|
||||
// get previous and next topic
|
||||
|
||||
|
|
|
@ -159,10 +159,6 @@ function forum_link($type, $node = 0, $main = 0) {
|
|||
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('forums'), 'forum');
|
||||
}
|
||||
|
||||
if (!$main && $type == 'node' && $node->type == 'forum') {
|
||||
// get previous and next topic
|
||||
|
||||
|
|
|
@ -179,19 +179,6 @@ function poll_insert($node) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function poll_link($type, $node = 0, $main) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('polls'), 'poll', array('title' => t('View the list of polls on this site.')));
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -179,19 +179,6 @@ function poll_insert($node) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function poll_link($type, $node = 0, $main) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$links[] = l(t('polls'), 'poll', array('title' => t('View the list of polls on this site.')));
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -67,19 +67,6 @@ function search_perm() {
|
|||
return array('search content', 'administer search');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function search_link($type) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('search content')) {
|
||||
$links[] = l(t('search'), 'search', array('title' => t('Search for older content.')));
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -67,19 +67,6 @@ function search_perm() {
|
|||
return array('search content', 'administer search');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_link().
|
||||
*/
|
||||
function search_link($type) {
|
||||
$links = array();
|
||||
|
||||
if ($type == 'page' && user_access('search content')) {
|
||||
$links[] = l(t('search'), 'search', array('title' => t('Search for older content.')));
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_menu().
|
||||
*/
|
||||
|
|
|
@ -137,14 +137,6 @@ function statistics_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$userlink = variable_get('statistics_userpage_link', '');
|
||||
if ($userlink) {
|
||||
$links[] = l(t($userlink), 'statistics', array('title' => t("View this site's most popular content.")));
|
||||
}
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,14 +137,6 @@ function statistics_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == 'page' && user_access('access content')) {
|
||||
$userlink = variable_get('statistics_userpage_link', '');
|
||||
if ($userlink) {
|
||||
$links[] = l(t($userlink), 'statistics', array('title' => t("View this site's most popular content.")));
|
||||
}
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue