• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP theme_links函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中theme_links函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_links函数的具体用法?PHP theme_links怎么用?PHP theme_links使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了theme_links函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: teca3_links__locale_block

function teca3_links__locale_block(&$variables)
{
    $variables['attributes']['class'][] = 'nav';
    $variables['attributes']['class'][] = 'navbar-nav';
    return theme_links($variables);
    //return '<ul class="language-switcher-locale-url nav nav-pills">'.$variables['tree'].'</ul>';
}
开发者ID:drupdateio,项目名称:teca,代码行数:7,代码来源:template.php


示例2: k373k_links

/**
  Draw menu.
*/
function k373k_links($variables) {
  if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
      $pid = variable_get('menu_main_links_source', 'main-menu');
    $tree = menu_tree($pid);
    return drupal_render($tree);
  }
  return theme_links($variables);
}
开发者ID:neochief,项目名称:373.kiev.ua,代码行数:11,代码来源:template.php


示例3: paeme_links__locale_block

/**
 * @file
 * template.php
 */
function paeme_links__locale_block(&$vars)
{
    foreach ($vars['links'] as $language => $langInfo) {
        $vars['links'][$language]['title'] = $language;
    }
    $content = theme_links($vars);
    return $content;
}
开发者ID:akapivo,项目名称:www.paeme.be,代码行数:12,代码来源:template.php


示例4: solsud_links

/**
 * Implements theme_links().
 */
function solsud_links($variables)
{
    if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
        $tree = menu_tree('main-menu');
        return drupal_render($tree);
    }
    return theme_links($variables);
}
开发者ID:maxocub,项目名称:solsud,代码行数:11,代码来源:template.php


示例5: bartik_plus_links

function bartik_plus_links($variables)
{
    if (array_key_exists('id', $variables['attributes']) && $variables['attributes']['id'] == 'main-menu-links') {
        $pid = variable_get('menu_main_links_source', 'main-menu');
        $tree = menu_tree($pid);
        return '<div id="main-menu-links">' . drupal_render($tree) . "</div>";
    }
    return theme_links($variables);
}
开发者ID:Chaogan-Yan,项目名称:rfmri.org,代码行数:9,代码来源:template.php


示例6: THEME_links__locale_block

function THEME_links__locale_block(&$vars)
{
    foreach ($vars['links'] as $language => $langInfo) {
        $abbr = $langInfo['language']->language;
        $name = $langInfo['language']->native;
        $vars['links'][$language]['title'] = '<abbr title="' . $name . '">' . $abbr . '</abbr>';
        $vars['links'][$language]['html'] = TRUE;
    }
    $content = theme_links($vars);
    return $content;
}
开发者ID:georgepetridis,项目名称:DrupalFiles,代码行数:11,代码来源:template.php


示例7: glossy_links

/**
 * Implements theme_links().
 */
function glossy_links($vars) {
	// Add superfish dropdowns effect to main menu
  if (array_key_exists('id', $vars['attributes']) && $vars['attributes']['id'] == 'main-menu' && variable_get('dh_display_menu_tree', true)) {
      $pid = variable_get('menu_main_links_source', 'main-menu');
			$tree = menu_tree($pid);
			$output = drupal_render($tree);
			$output = '<div class="superfish">' .$output. '</div>';
			return preg_replace('/<ul class="menu/i', '<ul class="main-menu clearfix', $output, 1);
  }
  return theme_links($vars);
}
开发者ID:redtrayworkshop,项目名称:msdworkshop,代码行数:14,代码来源:template.php


示例8: hyx_links__locale_block

function hyx_links__locale_block(&$variables)
{
    global $language;
    $variables['attributes']['class'][] = 'list-inline';
    foreach ($variables['links'] as $id => $link) {
        $variables['links'][$id]['attributes']['class'][] = 'btn hyx-radio';
        //$variables['links'][$id]['attributes']['data-title-xs'] = ucfirst($id);
        $variables['links'][$id]['title'] = ucfirst($id);
    }
    $content = theme_links($variables);
    return $content;
}
开发者ID:lcube45,项目名称:hyx,代码行数:12,代码来源:template.php


示例9: phptemplate_taxonomy_links

function phptemplate_taxonomy_links($node, $vid)
{
    if (count($node->taxonomy)) {
        $tags = array();
        foreach ($node->taxonomy as $term) {
            if ($term->vid == $vid) {
                $tags[] = array('title' => $term->name, 'href' => taxonomy_term_path($term), 'attributes' => array('rel' => 'tag'));
            }
        }
        if ($tags) {
            return theme_links($tags, array('class' => 'links inline'));
        }
    }
}
开发者ID:sojo,项目名称:d6_friendsofsilence,代码行数:14,代码来源:template.php


示例10: mies_links

function mies_links($links, $attributes = array('class' => 'links'))
{
    global $teaser;
    //dprint_r($links);
    // Unset the "node read more" link.
    if (isset($links["node_read_more"])) {
        $readmore = $links["node_read_more"];
        unset($links["node_read_more"]);
        //array_push($links,$readmore);
    }
    // Redirect the "comment add" to the Node-Page
    if (isset($links["comment_add"])) {
        $links["comment_add"]["href"] = ereg_replace("comment/reply", "node", $links["comment_add"]["href"]);
    }
    return theme_links($links, $attributes);
}
开发者ID:benthebear,项目名称:Mies,代码行数:16,代码来源:template.php


示例11: popularity_page

function popularity_page() {
  print theme_header(FALSE);
  print <<<EOS
<h1>How do we calculate popularity?</h1>

<p>In Status Time Capsule, your popularity depends on:</p>

<ul>
  <li>average number of comments per status,</li>
  <li>average number of likes per status, and</li>
  <li>variance of these numbers among your statuses.</li>
</ul>

<p>Therefore, someone that consistently attracts comments and likes to all of his/her statuses may be ranked as more popular, compared to someone that has occasional popular statuses (with lots of likes and comments).</p>

<p>Technically, we calculate the lower bound of Wilson score confidence interval for a Bernoulli parameter for each user of our app. Then, we rank these lower bound values and derive the top most popular users as well as the percentage of people ranked below yours. For more explanation about the algorithm, see <a href="http://www.evanmiller.org/how-not-to-sort-by-average-rating.html">the article by Evan Miller</a>.</p>

EOS;
  print theme_links();
  print theme_footer();
  // Ugly error suppression
  @log_insert('popularity_hit');
}
开发者ID:ryandao,项目名称:Facebook-Status-Time-Capsule,代码行数:23,代码来源:popularity.php


示例12: _phptemplate_links_inline

function _phptemplate_links_inline($links, $attributes)
{
    foreach ($links as $key => $link) {
        $index = strpos($key, '_');
        if (!$index) {
            $index = strpos($key, '-');
        }
        if ($index) {
            $group = substr($key, 0, $index);
        } else {
            $group = 'other';
        }
        $link_groups[$group][$key] = $link;
    }
    $output = '';
    if (count($link_groups) == 0) {
        return '';
    } else {
        if (count($link_groups) == 1) {
            return theme_links($links, $attributes);
        } else {
            $output = '<div' . drupal_attributes($attributes) . ">\n";
            foreach ($link_groups as $group => $links) {
                $output .= _phptemplate_links_as_div($links, array('class' => "link-group link-group-{$group}")) . "\n";
            }
            $output .= '</div>';
            return $output;
        }
    }
}
开发者ID:nabuur,项目名称:nabuur-d5,代码行数:30,代码来源:template.php


示例13: get_pane_links

 /**
  * Render the links to display when editing a pane.
  */
 function get_pane_links($pane, $content_type)
 {
     if (!empty($this->no_edit_links)) {
         return '';
     }
     $links = array();
     if (!empty($pane->shown)) {
         $links['top']['disabled'] = array('title' => t('Disable this pane'), 'href' => $this->get_url('hide', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     } else {
         $links['top']['enable'] = array('title' => t('Enable this pane'), 'href' => $this->get_url('show', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     }
     if (isset($this->display->title_pane) && $this->display->title_pane == $pane->pid) {
         $links['top']['panels-set-title'] = array('title' => t('&#x2713;Panel title'), 'html' => TRUE);
     } else {
         $links['top']['panels-set-title'] = array('title' => t('Panel title'), 'href' => $this->get_url('panel-title', $pane->pid), 'attributes' => array('class' => array('use-ajax')));
     }
     $subtype = ctools_content_get_subtype($content_type, $pane->subtype);
     if (ctools_content_editable($content_type, $subtype, $pane->configuration)) {
         $links['top']['settings'] = array('title' => isset($content_type['edit text']) ? $content_type['edit text'] : t('Settings'), 'href' => $this->get_url('edit-pane', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
     }
     if (user_access('administer advanced pane settings')) {
         $links['top']['css'] = array('title' => t('CSS properties'), 'href' => $this->get_url('pane-css', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
     }
     if (user_access('administer panels styles')) {
         $links['style'] = $this->get_style_links('pane', $pane->pid);
     }
     if (user_access('administer pane access')) {
         $contexts = $this->display->context;
         // Make sure we have the logged in user context
         if (!isset($contexts['logged-in-user'])) {
             $contexts['logged-in-user'] = ctools_access_get_loggedin_context();
         }
         $visibility_links = array();
         if (!empty($pane->access['plugins'])) {
             foreach ($pane->access['plugins'] as $id => $test) {
                 $plugin = ctools_get_access_plugin($test['name']);
                 $access_title = isset($plugin['title']) ? $plugin['title'] : t('Broken/missing access plugin %plugin', array('%plugin' => $test['name']));
                 $access_description = ctools_access_summary($plugin, $contexts, $test);
                 $visibility_links[] = array('title' => $access_description, 'href' => $this->get_url('access-configure-test', $pane->pid, $id), 'attributes' => array('class' => array('ctools-use-modal', 'panels-italic')));
             }
         }
         if (empty($visibility_links)) {
             $visibility_links['no_rules'] = array('title' => t('No rules'), 'attributes' => array('class' => array('panels-text')));
         }
         $visibility_links['add_rule'] = array('title' => t('Add new rule'), 'href' => $this->get_url('access-add-test', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $visibility_links['settings'] = array('title' => t('Settings'), 'href' => $this->get_url('access-settings', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $links['visibility'] = $visibility_links;
     }
     if (user_access('use panels locks')) {
         $lock_type = !empty($pane->locks['type']) ? $pane->locks['type'] : 'none';
         switch ($lock_type) {
             case 'immovable':
                 $lock_method = t('Immovable');
                 break;
             case 'regions':
                 $lock_method = t('Regions');
                 break;
             case 'none':
             default:
                 $lock_method = t('No lock');
                 break;
         }
         $lock_links['lock'] = array('title' => $lock_method, 'attributes' => array('class' => array('panels-text')));
         $lock_links['change'] = array('title' => t('Change'), 'href' => $this->get_url('lock', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         $links['lock'] = $lock_links;
     }
     if (panels_get_caches() && user_access('use panels caching features')) {
         $method = isset($pane->cache['method']) ? $pane->cache['method'] : 0;
         $info = panels_get_cache($method);
         $cache_method = isset($info['title']) ? $info['title'] : t('No caching');
         $cache_links['title'] = array('title' => $cache_method, 'attributes' => array('class' => array('panels-text')));
         $cache_links['change'] = array('title' => t('Change'), 'href' => $this->get_url('cache-method', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         if (panels_plugin_get_function('cache', $info, 'settings form')) {
             $cache_links['settings'] = array('title' => t('Settings'), 'href' => $this->get_url('cache-settings', $pane->pid), 'attributes' => array('class' => array('ctools-use-modal')));
         }
         $links['cache'] = $cache_links;
     }
     $links['bottom']['remove'] = array('title' => t('Remove'), 'href' => '#', 'attributes' => array('class' => array('pane-delete'), 'id' => "pane-delete-panel-pane-{$pane->pid}"));
     // Allow others to add/remove links from pane context menu.
     // Grouped by 'top', 'style', 'visibility', 'lock', 'cache' and 'bottom'
     drupal_alter('get_pane_links', $links, $pane, $content_type);
     $dropdown_links = $links['top'];
     $category_labels = array('style' => 'Style', 'visibility' => 'Visibility rules', 'lock' => 'Locking', 'cache' => 'Caching');
     foreach ($category_labels as $category => $label) {
         if (array_key_exists($category, $links)) {
             $dropdown_links[] = array('title' => '<hr />', 'html' => TRUE);
             $dropdown_links[] = array('title' => '<span class="dropdown-header">' . t($label) . '</span>' . theme_links(array('links' => $links[$category], 'attributes' => array(), 'heading' => array())), 'html' => TRUE, 'attributes' => array('class' => array('panels-sub-menu')));
         }
     }
     $dropdown_links[] = array('title' => '<hr />', 'html' => TRUE);
     $dropdown_links = array_merge($dropdown_links, $links['bottom']);
     return theme('ctools_dropdown', array('title' => theme('image', array('path' => ctools_image_path('icon-configure.png', 'panels'))), 'links' => $dropdown_links, 'image' => TRUE));
 }
开发者ID:casivaagustin,项目名称:drupal-services,代码行数:96,代码来源:panels_renderer_editor.class.php


示例14: zen_swissmon_links

function zen_swissmon_links($variables)
{
    if (!isset($variables['links'])) {
        return theme_links($variables);
    }
    $links = $variables['links'];
    foreach ($links as $key => $link) {
        if ($link['title'] == t('My account')) {
            global $user;
            $link['title'] = t('Signed in as') . ' ' . $user->name;
        }
        $links[$key] = $link;
    }
    $variables['links'] = $links;
    return theme_links($variables);
}
开发者ID:rettichschnidi,项目名称:naturvielfalt,代码行数:16,代码来源:template.php


示例15: event_list

		</div>
		
		<div id="hc_popular" style="display:none;">
		<?php 
event_list(1);
?>
		
		</div>
		
		<div id="hc_newest" style="display:none;">
		<?php 
event_list(2);
?>
		
		</div>
		
		<h2>Theme: <?php 
select_theme();
?>
</h2>
		
		<h2>&nbsp;</h2>
		<?php 
theme_links();
?>
		
	</aside>
	
	<?php 
get_footer();
开发者ID:pvidali,项目名称:BCSR-1,代码行数:30,代码来源:event.php


示例16: get_pane_links

  /**
   * Render the links to display when editing a pane.
   */
  function get_pane_links($pane, $content_type) {
    $links = array();

    if (!empty($pane->shown)) {
      $links[] = array(
        'title' => t('Disable this pane'),
        'href' => $this->get_url('hide', $pane->pid),
        'attributes' => array('class' => array('use-ajax')),
      );
    }
    else {
      $links[] = array(
        'title' => t('Enable this pane'),
        'href' => $this->get_url('show', $pane->pid),
        'attributes' => array('class' => array('use-ajax')),
      );
    }

    if (isset($this->display->title_pane) && $this->display->title_pane == $pane->pid) {
      $links['panels-set-title'] = array(
        'title' => t('&#x2713;Panel title'),
        'html' => TRUE,
      );
    }
    else {
      $links['panels-set-title'] = array(
        'title' => t('Panel title'),
        'href' => $this->get_url('panel-title', $pane->pid),
        'attributes' => array('class' => array('use-ajax')),
      );
    }

    $subtype = ctools_content_get_subtype($content_type, $pane->subtype);

    if (ctools_content_editable($content_type, $subtype, $pane->configuration)) {
      $links[] = array(
        'title' => isset($content_type['edit text']) ? $content_type['edit text'] : t('Settings'),
        'href' => $this->get_url('edit-pane', $pane->pid),
        'attributes' => array('class' => array('ctools-use-modal')),
      );
    }

    if (user_access('administer advanced pane settings')) {
      $links[] = array(
        'title' => t('CSS properties'),
        'href' => $this->get_url('pane-css', $pane->pid),
        'attributes' => array('class' => array('ctools-use-modal')),
      );
    }

    if (user_access('administer panels styles')) {
      $links[] = array(
        'title' => '<hr />',
        'html' => TRUE,
      );

      $style_links = $this->get_style_links('pane', $pane->pid);

      $links[] = array(
        'title' => '<span class="dropdown-header">' . t('Style') . '</span>' . theme_links(array('links' => $style_links, 'attributes' => array(), 'heading' => array())),
        'html' => TRUE,
        'attributes' => array('class' => array('panels-sub-menu')),
      );
    }

    if (user_access('administer pane access')) {
      $links[] = array(
        'title' => '<hr />',
        'html' => TRUE,
      );

      $contexts = $this->display->context;
      // Make sure we have the logged in user context
      if (!isset($contexts['logged-in-user'])) {
        $contexts['logged-in-user'] = ctools_access_get_loggedin_context();
      }

      $visibility_links = array();

      if (!empty($pane->access['plugins'])) {
        foreach ($pane->access['plugins'] as $id => $test) {
          $plugin = ctools_get_access_plugin($test['name']);
          $access_title  = isset($plugin['title']) ? $plugin['title'] : t('Broken/missing access plugin %plugin', array('%plugin' => $test['name']));
          $access_description = ctools_access_summary($plugin, $contexts, $test);

          $visibility_links[] = array(
            'title' => $access_description,
            'href' => $this->get_url('access-configure-test', $pane->pid, $id),
            'attributes' => array('class' => array('ctools-use-modal', 'panels-italic')),
          );
        }
      }
      if (empty($visibility_links)) {
        $visibility_links[] = array(
          'title' => t('No rules'),
          'attributes' => array('class' => array('panels-text')),
        );
//.........这里部分代码省略.........
开发者ID:north-central-college,项目名称:hrjobs,代码行数:101,代码来源:panels_renderer_editor.class.php


示例17: int_links

/**
 * Output RSS feed and iCalendar subscription links to a page outside of Helios Calendar.
 * @since 2.0.0
 * @version 2.0.0
 * @return void
 */
function int_links()
{
    theme_links();
}
开发者ID:pvidali,项目名称:BCSR-1,代码行数:10,代码来源:int.php


示例18: nys_links

function nys_links($links, $attributes = array('class' => 'links'))
{
    unset($links['node_read_more']);
    unset($links['blog_usernames_blog']);
    return theme_links($links, $attributes);
}
开发者ID:justinlundy,项目名称:SenateDrupal,代码行数:6,代码来源:template.php


示例19: fly_links

/**
* function to overwrite links. removes the reply link per node type
*
* @param $links
* @param $attributes
* @return unknown_type
*/
function fly_links($links, $attributes = array('class' => 'links'))
{
    // Link 'Add a comment' link to node page instead of comments reply page
    if ($links['comment_add']['href']) {
        $arr_linkparts = explode('/', $links['comment_add']['href']);
        $links['comment_add']['href'] = 'node/' . $arr_linkparts[2];
    }
    // Don't show 'reply' link for comments
    unset($links['comment_reply']);
    return theme_links($links, $attributes);
}
开发者ID:victoriachan,项目名称:victoriac-blog,代码行数:18,代码来源:template.php


示例20: bear_skin_links__user_menu

/**
 * Implements theme_links()
 * specifically for the user_menu only!
 * 1. Add a SMACCS / BEM style CSS classes
 * 2. Add ARIA roles for accessibility
 */
function bear_skin_links__user_menu(&$variables)
{
    // add the ARIA role for accessibility
    $variables['attributes']['role'] = 'menubar';
    foreach ($variables['links'] as $key => &$link) {
        if (!is_array($link)) {
            continue;
        }
        $link['attributes'] = !empty($link['attributes']) ? $link['attributes'] : array();
        $link['attributes']['class'][] = 'nav-user__link';
        $link['attributes']['role'] = 'menuitem';
    }
    return theme_links($variables);
}
开发者ID:Probo-Demos,项目名称:drupal_github,代码行数:20,代码来源:template.php



注:本文中的theme_links函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP theme_linktree函数代码示例发布时间:2022-05-23
下一篇:
PHP theme_js函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap