当前位置: 首页>>代码示例>>PHP>>正文


PHP hide函数代码示例

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


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

示例1: md_orenmode_form_system_theme_settings_alter

/**
 * Implements hook_form_FORM_ID_alter().
 *
 * @param $form
 *   The form.
 * @param $form_state
 *   The form state.
 */
function md_orenmode_form_system_theme_settings_alter(&$form, &$form_state, $form_id = NULL, $no_js_use = FALSE)
{
    global $base_url;
    if (isset($form_id)) {
        return;
    }
    // Need to hide default theme settings in system, we create it after
    unset($form['theme_settings']);
    hide($form['logo']);
    hide($form['favicon']);
    // Make default dialog markup for icon
    icon_default_dialog();
    $form['md_orenmode_settings']['html_header'] = array('#markup' => '<div id="md-framewp" class="md-framewp">
		<div id="md-framewp-header">
			<!-- /////////////////// ALERT BOX ///////////////// -->
				<div class="md-alert-boxs">

				</div>
		</div><!-- /#md-framewp-header -->
		<div id="md-framewp-body">
			<div id="md-tabs-framewp" class="md-tabs-framewp">
				<ul class="clearfix">
					<li><a href="#md-general">General</a></li>
					<li><a href="#md-design">Design</a></li>
					<li><a href="#md-display">Display</a></li>
					<li><a href="#md-text-typography">Text & Typography</a></li>
					<li><a href="#md-code">Custom Code</a></li>
					<li><a href="#md-config">Backup & Restore</a></li>
				</ul>
			</div><!-- /.md-tabs-framewp -->
			<div class="logo-right"><a href="http://megadrupal.com/forum"><img title="Visit our support forum" src="' . $base_url . '/' . THEME_PATH . '/img/theme-settings/logo.png" alt="Mega Drupal"></a></div>
			<div class="md-content-framewp">', '#weight' => -99);
    md_orenmode_theme_settings_general($form, $form_state);
    md_orenmode_theme_settings_design($form, $form_state);
    md_orenmode_theme_settings_display($form, $form_state);
    md_orenmode_theme_settings_text($form, $form_state);
    md_orenmode_theme_settings_code($form, $form_state);
    md_orenmode_theme_settings_config($form, $form_state);
    $form['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset Settings'), '#submit' => array('md_orenmode_reset_settings_submit'), '#weight' => 98, '#attributes' => array('class' => array('btn btn-reset'), 'onClick' => 'return confirm("Are you sure want to reset all settings to default ?")'));
    $form['actions']['submit']['#weight'] = 97;
    $form['actions']['submit']['#attributes'] = array('class' => array('btn btn-save'));
    $form['actions']['#prefix'] = '</div><!-- /.md-content-framewp -->
		</div><!-- /#md-framewp-body -->
		<div id="md-framewp-footer" class="md-framewp-footer">
		    <div class="footer-left">
				<div class="md-button-group">';
    $form['actions']['#suffix'] = '</div>
              </div>
              <div class="footer-right">
              </div>
        </div>
    </div><!-- /.md-framewp -->';
    // Load font styles
    $fonts = load_font_configure();
    drupal_add_js(array('font_array' => $fonts[0]), 'setting');
    drupal_add_js(array('font_vars' => $fonts[1]), 'setting');
    // add for fonts END
    $form['#validate'][] = 'md_orenmode_validate_theme_settings';
    $form['#submit'][] = 'md_orenmode_save_settings_submit';
}
开发者ID:xrfind,项目名称:ecommerce,代码行数:68,代码来源:theme-settings.php

示例2: pul_base_page_alter

/**
 * @file
 * Template overrides as well as (pre-)process and alter hooks for the
 * friends theme.
 */
function pul_base_page_alter(&$page)
{
    if (arg(0) == 'search') {
        if (!empty($page['content']['system_main']['search_form'])) {
            hide($page['content']['system_main']['search_form']);
        }
    }
}
开发者ID:pulibrary,项目名称:friends_of_pul,代码行数:13,代码来源:template.php

示例3: login

function login($password)
{
    global $config;
    if (hide($password) !== $config['password']) {
        return false;
    }
    $_SESSION['role'] = 'admin';
    return true;
}
开发者ID:zhizunbaonie,项目名称:blog,代码行数:9,代码来源:util.php

示例4: walk_preprocess_page

/**
 * Pre-processes variables for the "page" theme hook.
 *
 * See template for list of available variables.
 *
 * @see page.tpl.php
 *
 * @ingroup theme_preprocess
 */
function walk_preprocess_page(&$vars)
{
    // Add information about the number of sidebars.
    if (!empty($vars['page']['sidebar_first']) && !empty($vars['page']['sidebar_second'])) {
        $vars['content_column_class'] = ' class="col-sm-6"';
    } elseif (!empty($vars['page']['sidebar_first']) || !empty($vars['page']['sidebar_second'])) {
        $vars['content_column_class'] = ' class="col-sm-9"';
    } else {
        $vars['content_column_class'] = ' class="col-sm-12"';
    }
    if (bootstrap_setting('fluid_container') == 1) {
        $vars['container_class'] = 'container-fluid';
    } else {
        $vars['container_class'] = 'container';
    }
    // Primary nav.
    $vars['primary_nav'] = FALSE;
    if ($vars['main_menu']) {
        // Build links.
        $vars['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
        // Provide default theme wrapper function.
        $vars['primary_nav']['#theme_wrappers'] = array('menu_tree__primary');
    }
    // Secondary nav.
    $vars['secondary_nav'] = FALSE;
    if ($vars['secondary_menu']) {
        // Build links.
        $vars['secondary_nav'] = menu_tree(variable_get('menu_secondary_links_source', 'user-menu'));
        // Provide default theme wrapper function.
        $vars['secondary_nav']['#theme_wrappers'] = array('menu_tree__secondary');
    }
    $vars['navbar_classes_array'] = array('navbar');
    if (bootstrap_setting('navbar_position') !== '') {
        $vars['navbar_classes_array'][] = 'navbar-' . bootstrap_setting('navbar_position');
    } elseif (bootstrap_setting('fluid_container') == 1) {
        $vars['navbar_classes_array'][] = 'container-fluid';
    } else {
        $vars['navbar_classes_array'][] = 'container';
    }
    if (bootstrap_setting('navbar_inverse')) {
        $vars['navbar_classes_array'][] = 'navbar-inverse';
    } else {
        $vars['navbar_classes_array'][] = 'navbar-default';
    }
    if (arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'walk') {
        drupal_set_title('Hosting a Walk');
    }
    if (isset($vars['node']) && $vars['node']->nid == 12) {
        //dpm($vars);
        hide($vars['page']['content']['system_main']['nodes']);
    }
}
开发者ID:benjohnstone,项目名称:wwyd,代码行数:61,代码来源:page.vars.php

示例5: moa_preprocess_node

/**
 * Override or insert variables into the node templates.
 */
function moa_preprocess_node(&$vars)
{
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__' . $vars['view_mode'];
    switch ($vars['type']) {
        case 'project':
            if ($vars['view_mode'] == 'full') {
                if (isset($vars['field_hide_feature_image_on_proj']['und'][0]['value']) && $vars['field_hide_feature_image_on_proj']['und'][0]['value'] == 1) {
                    hide($vars['content']['field_feature_image']);
                }
            }
            break;
    }
}
开发者ID:benjohnstone,项目名称:moamedia,代码行数:16,代码来源:template.php

示例6: viewAnswer

 /**
  * Helper function to setup the faq answer.
  *
  * @param array &$data
  *   Array reference to store display data in.
  * @param Drupal\node\NodeInterface $node
  *   The node object.
  * @param string $back_to_top
  *   An array containing the "back to top" link.
  * @param bool $teaser
  *   Whether or not to use teasers.
  * @param bool $links
  *   Whether or not to show node links.
  */
 public static function viewAnswer(&$data, \Drupal\node\NodeInterface $node, $teaser)
 {
     $faq_settings = \Drupal::config('faq.settings');
     // TODO: hide 'submitted by ... on ...'
     $view_mode = $teaser ? 'teaser' : 'full';
     $node_build = node_view($node, $view_mode);
     hide($node_build['title']);
     if (!$faq_settings->get('question_long_form')) {
         hide($node_build['field_detailed_question']);
     }
     $content = drupal_render($node_build);
     $content .= FaqViewer::initBackToTop();
     $data['body'] = SafeMarkup::set($content);
 }
开发者ID:anyforsoft,项目名称:csua_d8,代码行数:28,代码来源:FaqViewer.php

示例7: europa_preprocess_node_form

/**
 * Preprocessor for theme('node_form').
 */
function europa_preprocess_node_form(&$variables)
{
    $i = 100;
    $variables['sidebar'] = array();
    $node_form_sidebar = theme_get_setting('node_form_sidebar');
    if ($node_form_sidebar) {
        foreach ($node_form_sidebar as $field_name) {
            if (isset($variables['form'][$field_name])) {
                $variables['form'][$field_name]['#weight'] = $i++;
                $variables['sidebar'][$field_name] = $variables['form'][$field_name];
                hide($variables['form'][$field_name]);
            }
        }
    }
    // Extract the form buttons, and put them in independent variable.
    $variables['buttons'] = $variables['form']['actions'];
    hide($variables['form']['actions']);
}
开发者ID:janoka,项目名称:platform-dev,代码行数:21,代码来源:template.php

示例8: midnight_preprocess_page

/**
 * Implements hook_preprocess_page().
 * @param $variables
 */
function midnight_preprocess_page(&$variables)
{
    $theme_path = drupal_get_path('theme', 'midnight');
    // These files will be disable responsive feature on theme.
    $disable_rss = theme_get_setting('disabling_responsiveness');
    if ($disable_rss) {
        drupal_add_css($theme_path . '/css/non-responsive.css', array('group' => CSS_THEME));
        drupal_add_js($theme_path . '/js/non-responsive.js', array('group' => JS_THEME));
    } else {
        $viewport = array('#tag' => 'meta', '#attributes' => array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'));
        drupal_add_html_head($viewport, 'viewport');
    }
    // Remove default message of system in front page.
    if ($variables['is_front']) {
        // This will remove the 'No front page content has been created yet.'
        hide($variables['page']['content']['system_main']['default_message']);
    }
}
开发者ID:gravitybrand,项目名称:gravity2.0,代码行数:22,代码来源:template.php

示例9: borg_form_user_profile_form_alter

/**
 * Implements hook_form_id_alter()
 * Modify the user edit form for usability++
 */
function borg_form_user_profile_form_alter(&$form, &$form_state)
{
    drupal_add_js('core/misc/vertical-tabs.js');
    $account_fieldset = array('#type' => 'fieldset', '#title' => t('Change Email or Password'), '#collapsible' => true, '#collapsed' => true, '#weight' => -9);
    $fields_for_account_fieldset = array('current_pass', 'mail', 'pass');
    foreach ($fields_for_account_fieldset as $field_name) {
        if (isset($form['account'][$field_name])) {
            $account_fieldset[$field_name] = $form['account'][$field_name];
            hide($form['account'][$field_name]);
        }
    }
    $form['account']['account_fieldset'] = $account_fieldset;
    $form['account']['#weight'] = 1;
    $form['account']['name']['#weight'] = -50;
    $form['field_name']['#weight'] = -51;
    $form['field_forhire']['#weight'] = 2;
    $form['field_services']['#weight'] = 3;
    $form['field_expertise']['#weight'] = 4;
    $form['field_bio']['#weight'] = 5;
    $form['field_photo']['#weight'] = 6;
    $form['field_header_photo']['#weight'] = 7;
    $form['field_gender']['#weight'] = 8;
    $form['field_gender'][LANGUAGE_NONE]['#options']['_none'] = t('- Not specified -');
    $form['field_industries']['#weight'] = 9;
    $social_fieldset = array('#type' => 'fieldset', '#title' => t('Find me Online'), '#collapsible' => true, '#collapsed' => false, '#weight' => 10);
    $form['field_social']['#weight'] = 1;
    $form['field_irc']['#weight'] = 2;
    $form['field_websites']['#weight'] = 3;
    $fields_for_account_fieldset = array('field_irc', 'field_social', 'field_websites');
    foreach ($fields_for_account_fieldset as $field_name) {
        $social_fieldset[$field_name] = $form[$field_name];
        hide($form[$field_name]);
    }
    $form['social_fieldset'] = $social_fieldset;
    $form['field_contributions']['#weight'] = 11;
    $form['field_contributions_other']['#weight'] = 12;
    $form['contact']['#weight'] = 21;
    $form['timezone']['#weight'] = 22;
    $form['timezone']['#collapsed'] = TRUE;
    $form['redirect']['#weight'] = 23;
}
开发者ID:serundeputy,项目名称:backdropcms.org,代码行数:45,代码来源:template.php

示例10: render

?>
            <?php 
print render($content['field_promotion_sortie_bio_en']);
?>
            <?php 
print render($content['field_promotion_sortie_liens']);
?>
        </div>
    </div>


    <?php 
// Hide comments, tags, and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
hide($content['field_tags']);
print render($content);
?>


    <?php 
if (!empty($content['field_tags']) || !empty($content['links'])) {
    ?>
        <footer>
            <?php 
    print render($content['field_tags']);
    ?>
            <?php 
    print render($content['links']);
    ?>
        </footer>
开发者ID:eheuje,项目名称:LadloDrupal,代码行数:31,代码来源:node--ladlo_promotion_sortie.tpl.php

示例11: render

?>
>   
      <div class="node-header">
        <?php 
print $name;
if (array_key_exists('group_audience', $content)) {
    print " &#8658; ";
    print render($content['group_audience'][0]);
}
?>
      </div>
      <div class="node-body">
      <?php 
hide($content['comments']);
hide($content['links']);
hide($content['comment_form']);
print render($content);
?>
      </div>
      <?php 
// Remove the "Add new comment" link if the comment
// form is being displayed on the same page.
if (!empty($content['comments']['comment_form'])) {
    unset($content['links']['comment']['#links']['comment-add']);
}
// Only display the wrapper div if there are links.
$links = render($content['links']);
if ($links) {
    ?>
      <div class="link-wrapper">
        <?php 
开发者ID:rabisg,项目名称:insight_status,代码行数:31,代码来源:node--insight_microblog.tpl.php

示例12: hide

    if (!empty($node->image)) {
        ?>
        <a href="<?php 
        print $node->node_url;
        ?>
"><?php 
        print $node->image;
        ?>
</a>
      <?php 
    }
    ?>
    </div>

      <div class='expert_network_text_block'>
          <?php 
    hide($content['comments']);
    hide($content['links']);
    hide($content['field_single_image']);
    print render($content);
    ?>
      </div>
      
  </div>
</div>
<?php 
}
?>


开发者ID:johnedelatorre,项目名称:fusion,代码行数:28,代码来源:node--sportsnet.tpl.php

示例13: render

}
?>
    <!-- Tagline -->
    <div class="section-csrc-tagline">
      <?php 
print render($content['field_section_tagline']);
?>
    </div>


    <?php 
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
// hide($content['links']);
hide($content['field_section_cover_image']);
hide($content['field_section_tagline']);
print render($content);
?>

    <a class="section-btn-postion btn btn-primary btn-lg" href="#updates" role="button">Project Updates</a>

  </div>


</div>

<a name="updates"></a>

<!-- Changes button to read as message
if no link added to register-button
field on admin form -->
开发者ID:rochester-rcl,项目名称:rcl_drupal_theme,代码行数:31,代码来源:node--21.tpl.php

示例14: hide

    print $submitted;
    ?>
      </div>
    <?php 
}
?>

    <div class="content"<?php 
print $content_attributes;
?>
>
      <?php 
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
hide($content['field_est_lat_lot']);
print render($content);
?>
    </div>

    <?php 
print render($content['links']);
?>
    <?php 
print render($content['comments']);
?>
  </div>

  <div class="col-md-6">
    <?php 
print render($content['field_est_lat_lot']);
开发者ID:edutrul,项目名称:puentesperu,代码行数:31,代码来源:node--establecimiento-de-salud.tpl.php

示例15: hide

  <?php 
}
?>

  <div class="article_content"<?php 
print $content_attributes;
?>
>
    <?php 
// Hide comments, tags, and links now so that we can render them later.
hide($content['taxonomy_forums']);
hide($content['comments']);
hide($content['links']);
hide($content['field_tags']);
hide($content['field_image']);
print render($content);
?>
  </div>

  <div class="post_share_wrap">
    <ul class="post_share">
      <li><a href="http://twitter.com/home?status=<?php 
print $share_url;
?>
"><i class="social foundicon-twitter"></i></a></li>
      <li><a href="http://www.facebook.com/sharer.php?u=<?php 
print $share_url;
?>
"><i class="social foundicon-facebook"></i></a></li>
      <li><a href="http://www.stumbleupon.com/submit?url=<?php 
开发者ID:609,项目名称:FA,代码行数:30,代码来源:node--blog.tpl.php


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