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


PHP wp_loginout函数代码示例

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


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

示例1: widget_chaostheory_meta

function widget_chaostheory_meta($args)
{
    extract($args);
    if (empty($title)) {
        $title = __('Meta', 'chaostheory');
    }
    ?>
		<?php 
    echo $before_widget;
    ?>
			<?php 
    echo $before_title . $title . $after_title;
    ?>
			<ul>
				<?php 
    wp_register();
    ?>
				<li><?php 
    wp_loginout();
    ?>
</li>
				<?php 
    wp_meta();
    ?>
			</ul>
		<?php 
    echo $after_widget;
}
开发者ID:darrylivan,项目名称:caraccidentlawyerflagstaff.com,代码行数:28,代码来源:widgets.php

示例2: widget_thematic_meta

function widget_thematic_meta($args)
{
    extract($args);
    if (empty($title)) {
        $title = __('Meta', 'thematic');
    }
    ?>
			<?php 
    echo $before_widget;
    ?>
				<?php 
    echo thematic_before_title() . $title . thematic_after_title();
    ?>
				<ul>
					<?php 
    wp_register();
    ?>
					<li><?php 
    wp_loginout();
    ?>
</li>
					<?php 
    wp_meta();
    ?>
				</ul>
			<?php 
    echo $after_widget;
}
开发者ID:sandesh247,项目名称:sandesh247.com,代码行数:28,代码来源:widgets.php

示例3: widget

 function widget($args, $instance)
 {
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if ($title) {
         echo '<h3>';
         echo $before_title . $title . $after_title;
         echo '</h3>';
     }
     echo '<div class="textwidget">';
     echo '<ul>';
     if (is_user_logged_in()) {
         echo '<li class="loggedin">';
         echo wp_loginout('/');
         echo '</li>';
         echo '<li><a href="https://bmp.saanich.ca/wp-admin/edit.php?post_type=qa_faqs">Edit or add BMPS</a></li>';
     } else {
         echo '<li class="loggedout"><a href="https://bmp.saanich.ca/wp-login.php">Log in</a></li>';
     }
     echo '<li><a href="https://bmp.saanich.ca">BMP home page</a></li>';
     echo '<li><a href="http://www.env.gov.bc.ca/wld/BMP/bmpintro.html">Ministry of Environment BMP Guidelines</a></li>';
     echo '<li><a href="http://www.env.gov.bc.ca/wld/index.htm">Ministry of Environment Ecosystems Branch</a></li>';
     echo '</ul>';
     echo '</div>';
     echo $after_widget;
 }
开发者ID:joelfriesen,项目名称:BMPtheme2015,代码行数:26,代码来源:loginwidget.php

示例4: wpuf_edit_users

function wpuf_edit_users()
{
    ob_start();
    //if user is logged in
    if (is_user_logged_in()) {
        //this user can edit the users
        if (current_user_can('edit_users')) {
            $action = isset($_GET['action']) ? $_GET['action'] : 'show';
            $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : 0;
            $userdata = get_userdata($user_id);
            switch ($action) {
                case 'edit':
                    //if user exists
                    if ($user_id && $userdata) {
                        wpuf_user_edit_profile_form($user_id);
                    } else {
                        printf(__("User doesn't exists", 'wpuf'));
                    }
                    break;
                case 'wpuf_add_user':
                    wpuf_add_user();
                    break;
                default:
                    wpuf_show_users();
            }
        } else {
            // user don't have any permission
            printf(__("You don't have permission for this purpose", 'wpuf'));
        }
    } else {
        //user is not logged in
        printf(__("This page is restricted. Please %s to view this page.", 'wpuf'), wp_loginout('', false));
    }
    return ob_get_clean();
}
开发者ID:brunolampada,项目名称:foss4g2014-wordpress,代码行数:35,代码来源:wpuf-edit-user.php

示例5: pickle_top_utility

function pickle_top_utility()
{
    //the utility html starts here
    ?>
    <div class="top_container">
        <div class="top_container_content">
            <div id="login">
                <span class="loginout"><?php 
    wp_loginout();
    ?>
</span>
                <span class="register"><?php 
    wp_register('| ', '');
    ?>
</span>
            </div>
            <div id="greeting">
                <p>Please tell us what pickle pleases you. <span style="color:red;">Join Here</span></p>
            </div>
            <div class="search_form_container">
                <?php 
    get_search_form();
    ?>
            </div>
        </div>
    </div>
    <?php 
    //the utility html ends here
}
开发者ID:jhgreenblatt,项目名称:Pickle--Please,代码行数:29,代码来源:functions.php

示例6: widget_simple_login

 function widget_simple_login($args)
 {
     extract($args);
     $options = get_option('widget_simple_login');
     $title = apply_filters('widget_title', $options['title']);
     switch ($options['redirectto']) {
         case "site":
             $redirect = "/";
             break;
         case "custom":
             $redirect = $options['customredirect'];
             break;
         case "actual":
             $redirect = $_SERVER['REQUEST_URI'];
             break;
         case "admin":
             //default setting
         //default setting
         default:
             $redirect = "";
     }
     echo $before_widget;
     echo $before_title . $title . $after_title;
     echo "\t<ul>\n\t\t";
     wp_register();
     echo "\n\t\t<li>";
     wp_loginout($redirect);
     echo "</li>\n\t</ul>\n";
     echo $after_widget;
 }
开发者ID:sriram911,项目名称:pls,代码行数:30,代码来源:simple_login.php

示例7: ons_display_open_header

function ons_display_open_header()
{
    ?>

  <div class="loginout">
    <span><?php 
    wp_loginout($redirect);
    ?>
</span>
    <span> | </span>
    <span><?php 
    wp_register('', '');
    ?>
</span>
  </div>

  <!-- header links -->
  <div style="position: absolute; top: 25px;">
    <img id="Image-Maps_7201206261231527" src="/wp-content/uploads/2012/06/transparent.png"" usemap="#Image-Maps_7201206261231527" border="0" width="1000" height="100" alt="">
    <map id="_Image-Maps_7201206261231527" name="Image-Maps_7201206261231527">
      <area shape="rect" coords="5,25,188,115" href="http://neighbourhoodstudy.ca/" alt="Ottawa Neighbourhood Study" title="Ottawa Neighbourhood Study">
      <area shape="rect" coords="197,53,348,120" href="http://ottawa.ca/en/health_safety/about/oph/index.html" alt="Ottawa Public Health" title="Ottawa Public Health">
      <area shape="rect" coords="353,53,477,120" href="http://www.uottawa.ca/" alt="University of Ottawa" title="University of Ottawa">
      <area shape="rect" coords="478,53,622,120" href="http://www.coalitionottawa.ca" alt="Coalition of Community and Health" title="Coalition of Community and Health">
      <area shape="rect" coords="622,53,715,120" href="http://www.ibm.com" alt="IBM" title="IBM">
      <area shape="rect" coords="716,53,844,120" href="http://www.champlainlhin.on.ca" alt="Champlain Local Health" title="Champlain Local Health">
      <area shape="rect" coords="847,53,991,120" href="http://www.unitedway.org" alt="United Way" title="United Way">
    </map>
  </div>

<?php 
}
开发者ID:neighbourhoodstudy,项目名称:ons-web,代码行数:32,代码来源:functions.php

示例8: widget_itheme_meta

function widget_itheme_meta()
{
    ?>
      <!--sidebox start -->
      <div id="meta" class="dbx-box">
        <h3 class="dbx-handle">Meta</h3>
        <div class="dbx-content">
          <ul>
              <li class="rss"><a href="<?php 
    bloginfo('rss2_url');
    ?>
">Entries (RSS)</a></li>
              <li class="rss"><a href="<?php 
    bloginfo('comments_rss2_url');
    ?>
">Comments (RSS)</a></li>
              <li class="wordpress"><a href="http://www.wordpress.org" title="Powered by WordPress">WordPress</a></li>
              <li class="login"><?php 
    wp_loginout();
    ?>
</li>
          </ul>
        </div>
      </div>
      <!--sidebox end -->

<?php 
}
开发者ID:phatboyg,项目名称:phatboyg.github.io,代码行数:28,代码来源:functions.php

示例9: suffusion_sbtab_meta

function suffusion_sbtab_meta()
{
    echo '<ul>';
    wp_register();
    ?>
		<li><?php 
    wp_loginout();
    ?>
</li>
		<li class="rss"><a href="<?php 
    bloginfo('rss2_url');
    ?>
" title="<?php 
    echo esc_attr(__('Syndicate this site using RSS 2.0', 'suffusion'));
    ?>
"><?php 
    _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>', 'suffusion');
    ?>
</a></li>
		<li class="rss"><a href="<?php 
    bloginfo('comments_rss2_url');
    ?>
" title="<?php 
    echo esc_attr(__('The latest comments to all posts in RSS', 'suffusion'));
    ?>
"><?php 
    _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>', 'suffusion');
    ?>
</a></li>
<?php 
    wp_meta();
    echo '</ul>';
}
开发者ID:kevinaxu,项目名称:99boulders,代码行数:33,代码来源:sidebar-tabs.php

示例10: widget

        function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', $instance['title']);
            $meta = $instance['meta'];
            if (!is_user_logged_in() || is_user_logged_in() && $meta) {
                echo $before_widget;
                if ($title) {
                    echo $before_title . $title . $after_title;
                }
                if (!is_user_logged_in()) {
                    wp_connect();
                } else {
                    $url = is_singular() ? get_permalink() : '';
                    ?>
			<ul>
			<?php 
                    wp_register();
                    ?>
			<li><?php 
                    wp_loginout($url);
                    ?>
</li>
			</ul>
        <?php 
                }
                echo $after_widget;
            }
        }
开发者ID:liangwei1988,项目名称:wordpress,代码行数:29,代码来源:widget.php

示例11: get_sidebar

    function get_sidebar($index)
    {
        if (!dynamic_sidebar($index)) {
            if (!dynamic_sidebar('Default Sidebar')) {
                ?>
					<div class="sidebarbox widget_meta">		
						
						<h3 class="sidebar-title"><span>Meta</span></h3>
							<ul>
								<?php 
                wp_register();
                ?>
								<li><?php 
                wp_loginout();
                ?>
</li>
								<?php 
                wp_meta();
                ?>
							</ul>

					</div>
				<?php 
            }
        }
    }
开发者ID:rajveerbeniwal,项目名称:rooms-dhkh,代码行数:26,代码来源:sidebar-generator.php

示例12: add_login_logout_link

function add_login_logout_link($items, $args)
{
    ob_start();
    wp_loginout('index.php');
    $loginoutlink = ob_get_contents();
    ob_end_clean();
    $items .= '<li>' . $loginoutlink . '</li>';
    return $items;
}
开发者ID:anaseya,项目名称:wpblog,代码行数:9,代码来源:functions.php

示例13: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta', 'tfuse') : $instance['title'], $instance, $this->id_base);
        $before_widget = ' <div id="meta-' . $args['widget_id'] . '" class="widget-container widget_meta">';
        $after_widget = '</div>';
        $before_title = '<h3 class="widget-title">';
        $after_title = '</h3>';
        echo $before_widget;
        $title = tfuse_qtranslate($title);
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

			<ul>
			<?php 
        wp_register();
        ?>

			<li><?php 
        wp_loginout();
        ?>
</li>
			<li><a href="<?php 
        bloginfo('rss2_url');
        ?>
" title="<?php 
        echo esc_attr(__('Syndicate this site using RSS 2.0', 'tfuse'));
        ?>
"><?php 
        _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>');
        ?>
</a></li>
			<li><a href="<?php 
        bloginfo('comments_rss2_url');
        ?>
" title="<?php 
        echo esc_attr(__('The latest comments to all posts in RSS', 'tfuse'));
        ?>
"><?php 
        _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>');
        ?>
</a></li>
			<li><a href="http://wordpress.org/" title="<?php 
        echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'tfuse'));
        ?>
">WordPress.org</a></li>
			<?php 
        wp_meta();
        ?>

			</ul>
<?php 
        echo $after_widget;
    }
开发者ID:shimion,项目名称:stlucks,代码行数:56,代码来源:TF_Widget_Meta.php

示例14: clp_display

 /**
  *
  * Display the login form with shortcode
  *
  */
 public function clp_display()
 {
     $eol = "\n";
     ob_start();
     echo '<div class="a5_custom_login_container" style="margin: 5px; padding: 20px;">' . $eol;
     if (!is_user_logged_in()) {
         $formargs['redirect'] = isset(self::$options['redirect']) && !empty(self::$options['redirect']) ? self::$options['redirect'] : home_url($_SERVER['REQUEST_URI']);
         $formargs['form_id'] = isset(self::$options['form_id']) && !empty(self::$options['form_id']) ? self::$options['form_id'] : 'loginform';
         $formargs['label_username'] = isset(self::$options['label_username']) && !empty(self::$options['label_username']) ? self::$options['label_username'] : __('Username');
         $formargs['label_password'] = isset(self::$options['label_password']) && !empty(self::$options['label_password']) ? self::$options['label_password'] : __('Password');
         $formargs['label_remember'] = isset(self::$options['label_remember']) && !empty(self::$options['label_remember']) ? self::$options['label_remember'] : __('Remember Me');
         $formargs['label_log_in'] = isset(self::$options['label_log_in']) && !empty(self::$options['label_log_in']) ? self::$options['label_log_in'] : __('Log In');
         $formargs['id_username'] = isset(self::$options['id_username']) && !empty(self::$options['id_username']) ? self::$options['id_username'] : 'user_login';
         $formargs['id_password'] = isset(self::$options['id_password']) && !empty(self::$options['id_password']) ? self::$options['id_password'] : 'user_pass';
         $formargs['id_remember'] = isset(self::$options['id_remember']) && !empty(self::$options['id_remember']) ? self::$options['id_remember'] : 'rememberme';
         $formargs['id_submit'] = isset(self::$options['id_submit']) && !empty(self::$options['id_submit']) ? self::$options['id_submit'] : 'wp-submit';
         $formargs['remember'] = isset(self::$options['hide_remember']) && !empty(self::$options['hide_remember']) ? false : true;
         $formargs['value_username'] = isset(self::$options['value_username']) && !empty(self::$options['value_username']) ? self::$options['value_username'] : NULL;
         $formargs['value_remember'] = isset(self::$options['value_remember']) && !empty(self::$options['value_remember']) ? true : false;
         if (isset(self::$options['title']) && !empty(self::$options['title'])) {
             $title_tag = ' title="' . self::$options['title'] . '"';
         }
         if (isset(self::$options['logo']) && !empty(self::$options['logo'])) {
             $img_tag = '<img src="' . self::$options['logo'] . '"' . $title_tag . ' />';
         }
         if (isset($img_tag)) {
             echo isset(self::$options['url']) && !empty(self::$options['url']) ? '<a href="' . self::$options['url'] . '"' . $title_tag . '>' . $img_tag . '</a>' : $img_tag;
         }
         if (isset(self::$options['login_message']) && !empty(self::$options['login_message'])) {
             echo self::$options['login_message'];
         }
         wp_login_form($formargs);
         if (isset(self::$options['login_footer']) && !empty(self::$options['login_footer'])) {
             echo self::$options['login_footer'];
         }
     } else {
         wp_loginout(home_url());
         echo ' | ';
         wp_register('', '');
     }
     echo '</div>' . $eol;
     $output = ob_get_contents();
     if (!empty(self::$options['_login_form_top'])) {
         $output = str_replace(self::$options['_login_form_top'], self::$options['login_form_top'], $output);
     }
     if (!empty(self::$options['_login_form'])) {
         $output = str_replace(self::$options['_login_form'], self::$options['login_form'], $output);
     }
     if (!empty(self::$options['_login_form_bottom'])) {
         $output = str_replace(self::$options['_login_form_bottom'], self::$options['login_form_bottom'], $output);
     }
     ob_end_clean();
     return $output;
 }
开发者ID:SayenkoDesign,项目名称:gogo-racing.com,代码行数:59,代码来源:CLP_ShortcodeClass.php

示例15: add_login_logout_link

function add_login_logout_link($items, $args)
{
    $loginoutlink = wp_loginout('index.php', false);
    if (!is_user_logged_in()) {
        $registerlink = wp_register('', '', false);
        $items .= '<li class="menu-item login">' . $loginoutlink . '</li>' . '<li class="menu-item register">' . $registerlink . '</li>';
    } else {
        $items .= '<li class="menu-item login">' . $loginoutlink . '</li>';
    }
    return $items;
}
开发者ID:kajidipes,项目名称:saedi-works,代码行数:11,代码来源:functions.php


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