Template Tags/wp register

Материал из WordPress Wiki

Перейти к: навигация, поиск

Содержание

Description

This tag displays either the "Register" link to users that are not logged in or the "Site Admin" link if a user is logged in. The "Register" link is only offered if the Administration > Settings > General > Membership: Anyone can register box is checked. The Register link causes the /wp-register.php script to execute and Site Admin links to /wp-admin/index.php.

This tag became available beginning with WordPress 1.5.

This tag does not function as intended on WordPress µ.

Usage

%%% <?php wp_register('before', 'after'); ?> %%%

Parameters

before (string)
Text to display before the Register or Site Admin link. Default is '<li>'.
after (string)
Text to display after the Register or Site Admin link. Default is '</li>'.

Examples

Default Usage

wp_register displays the link in list format <li>.

<?php wp_register(); ?> 

Display Without Text Before or After

The following code example displays the "Register" or "Site Admin" link with no text in before or after parameters.

<?php wp_register('', ''); ?> 

WordPress µ

On WordPress µ, there is no /wp-register.php file, and /wp-login.php?action=register is not a valid registration form. Thus, wp_register does not show a registration link.

Related

Шаблон:Tag General Tags

Шаблон:PHP Function Tag Footer

Личные инструменты
Реклама