本文整理汇总了PHP中before_last_bar函数的典型用法代码示例。如果您正苦于以下问题:PHP before_last_bar函数的具体用法?PHP before_last_bar怎么用?PHP before_last_bar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了before_last_bar函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _nc
/**
* A version of _n(), which supports contexts.
* Strips everything from the translation after the last bar.
*
* @since 2.7.0
* @deprecated 3.0.0
* @deprecated Use _nx()
* @see _nx()
* @see _n() For parameters.
* @see _c() For parameters. _c() is deprecated.
*
*/
function _nc($single, $plural, $number, $domain = 'default')
{
_deprecated_function(__FUNCTION__, '2.9', '_nx()');
return before_last_bar(_n($single, $plural, $number, $domain));
}
开发者ID:rkglug,项目名称:WordPress,代码行数:17,代码来源:deprecated.php
示例2: _nc
/**
* @see _n() A version of _n(), which supports contexts --
* strips everything from the translation after the last bar
*
*/
function _nc($single, $plural, $number, $domain = 'default')
{
return before_last_bar(__ngettext($single, $plural, $number, $domain));
}
开发者ID:nitzanb,项目名称:letseat,代码行数:9,代码来源:l10n.php
示例3: translate_user_role
/**
* Translates role name. Since the role names are in the database and
* not in the source there are dummy gettext calls to get them into the POT
* file and this function properly translates them back.
*
* The before_last_bar() call is needed, because older installs keep the roles
* using the old context format: 'Role name|User role' and just skipping the
* content after the last bar is easier than fixing them in the DB. New installs
* won't suffer from that problem.
*/
function translate_user_role($name)
{
return translate_with_gettext_context(before_last_bar($name), 'User role');
}
开发者ID:laiello,项目名称:cartonbank,代码行数:14,代码来源:l10n.php
示例4: foreach
<?php
$wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM {$wpdb->users} ORDER BY ID");
$style = '';
foreach ($wp_user_search as $userid) {
$user_id = (int) $userid->ID;
$user_login = stripslashes($userid->user_login);
$display_name = stripslashes($userid->display_name);
$current_color = get_user_option('admin_color', $user_id);
$user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
$user_object = new WP_User($user_id);
$roles = $user_object->roles;
$role = array_shift($roles);
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($wp_roles->role_names[$role]);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($wp_roles->role_names[$role]);
} else {
$role_name = strrpos($wp_roles->role_names[$role], '|');
}
$style = ' class="alternate"' == $style ? '' : ' class="alternate"';
$return = '';
$return .= '<tr>' . "\n";
$return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_id . '</td>' . "\n";
$return .= "\t" . '<td>' . $user_login . '</td>' . "\n";
$return .= "\t" . '<td>' . $display_name . '</td>' . "\n";
$return .= "\t" . '<td>' . $current_color . '</td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_level . '</td>' . "\n";
$return .= "\t" . '<td>' . $role_name . '</td>' . "\n";
$return .= '</tr>' . "\n";
echo $return;
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:31,代码来源:theme_options.php
示例5: add_config_form
//.........这里部分代码省略.........
</textarea>
<br />
<small><?php
_e('Use the first <em>%1$s</em> for the time value or countdown and second <em>%2$s</em> for the unit of the time or countdown-value; HTML and Shortcodes are possible', FB_WM_TEXTDOMAIN);
?>
</small>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="wm_config-exclude"><?php
_e('Excludes:', FB_WM_TEXTDOMAIN);
?>
</label>
</th>
<td>
<?php
if (isset($value['exclude'])) {
if (1 < count($value['exclude'])) {
$value_exclude = join(', ', $value['exclude']);
} else {
$value_exclude = $value['exclude'];
}
} else {
$value_exclude = NULL;
}
?>
<input size="30" type="text" id="wm_config-exclude" name="wm_config-exclude" value="<?php
echo $value_exclude;
?>
" />
<br />
<small><?php
_e('Exclude feed, pages, posts or archives from the maintenance mode. Add the Slug of page or post as a comma-separated list.<br />Example:', FB_WM_TEXTDOMAIN);
?>
<code>wp-cron, feed, wp-admin, ?page_id=12, about, my-first-page, how-is-this-possible, category/test</code></small>
</td>
</tr>
<tr valign="top">
<th scope="row" class="alternate">
<label for="wm_config-role"><?php
_e('Role:', FB_WM_TEXTDOMAIN);
?>
</label>
</th>
<td class="alternate">
<select name="wm_config-role" id="wm_config-role">
<?php
// fallback
if (!isset($value['role'][0])) {
$value['role'][0] = NULL;
}
foreach ($wp_roles->roles as $role => $name) {
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($name['name']);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($name['name'], 'User role');
} else {
$role_name = strrpos($name['name'], '|');
}
if ($value['role'][0] !== $role) {
$selected = '';
} else {
$selected = ' selected="selected"';
}
echo '<option value="' . $role . '"' . $selected . '>' . $role_name . ' (' . $role . ')' . ' </option>';
}
?>
</select>
<small><?php
_e('Allowed userrole to see the frontend of this blog.', FB_WM_TEXTDOMAIN);
?>
<?php
if (is_multisite()) {
_e('Super Admin has always access.', FB_WM_TEXTDOMAIN);
}
?>
</small>
</td>
</tr>
</table>
<br />
<div class="plugin-update-tr">
<p id="wm_message_update2" class="update-message"><?php
echo sprintf(__('Plugin %s settings <strong>updated</strong>.', FB_WM_TEXTDOMAIN), $wm_plugindata['Name']);
?>
</p>
</div>
<p id="submitbutton">
<input id="wm_config_submit" type="button" value="<?php
_e('Save', FB_WM_TEXTDOMAIN);
?>
" class="button-secondary" />
</p>
</div>
</td>
</tr>
<?php
}
开发者ID:BGCX261,项目名称:zhibeifw-in-tibetan-svn-to-git,代码行数:101,代码来源:wp-maintenance-mode.php
示例6: add_config_form
//.........这里部分代码省略.........
</option>
<option value="1" <?php
selected($value['bypass'], 1);
?>
><?php
_e('True', FB_WM_TEXTDOMAIN);
?>
</option>
</select>
<small><?php
_e('Allow Search Bots to bypass maintenance mode?', FB_WM_TEXTDOMAIN);
?>
</small>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="wm_config-role"><?php
_e('Backend Role:', FB_WM_TEXTDOMAIN);
?>
</label>
</th>
<td class="alternate">
<select name="wm_config-role" id="wm_config-role">
<?php
// fallback
if (!isset($value['role'][0])) {
$value['role'][0] = NULL;
}
foreach ($wp_roles->roles as $role => $name) {
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($name['name']);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($name['name'], 'User role');
} else {
$role_name = strrpos($name['name'], '|');
}
if ($value['role'][0] !== $role) {
$selected = '';
} else {
$selected = ' selected="selected"';
}
echo '<option value="' . $role . '"' . $selected . '>' . $role_name . ' (' . $role . ')' . ' </option>';
}
?>
</select>
<small><?php
_e('Allowed userrole to access the backend of this blog.', FB_WM_TEXTDOMAIN);
?>
<?php
if (is_multisite()) {
_e('Super Admin has always access.', FB_WM_TEXTDOMAIN);
}
?>
</small>
</td>
</tr>
<tr valign="top">
<th scope="row">
<label for="wm_config-role_frontend"><?php
_e('Frontend Role:', FB_WM_TEXTDOMAIN);
?>
</label>
</th>
<td class="alternate">
开发者ID:donwea,项目名称:nhap.org,代码行数:67,代码来源:wp-maintenance-mode-settings.php
示例7: duo_admin_init
function duo_admin_init()
{
if (is_multisite()) {
$wp_roles = duo_get_roles();
$roles = $wp_roles->get_names();
$allroles = array();
foreach ($roles as $key => $role) {
$allroles[before_last_bar($key)] = before_last_bar($role);
}
duo_add_site_option('duo_ikey', '');
duo_add_site_option('duo_skey', '');
duo_add_site_option('duo_host', '');
duo_add_site_option('duo_roles', $allroles);
duo_add_site_option('duo_xmlrpc', 'off');
} else {
add_settings_section('duo_settings', 'Main Settings', 'duo_settings_text', 'duo_settings');
add_settings_field('duo_ikey', 'Integration key', 'duo_settings_ikey', 'duo_settings', 'duo_settings');
add_settings_field('duo_skey', 'Secret key', 'duo_settings_skey', 'duo_settings', 'duo_settings');
add_settings_field('duo_host', 'API hostname', 'duo_settings_host', 'duo_settings', 'duo_settings');
add_settings_field('duo_roles', 'Enable for roles:', 'duo_settings_roles', 'duo_settings', 'duo_settings');
add_settings_field('duo_xmlrpc', 'Disable XML-RPC (recommended)', 'duo_settings_xmlrpc', 'duo_settings', 'duo_settings');
register_setting('duo_settings', 'duo_ikey', 'duo_ikey_validate');
register_setting('duo_settings', 'duo_skey', 'duo_skey_validate');
register_setting('duo_settings', 'duo_host');
register_setting('duo_settings', 'duo_roles', 'duo_roles_validate');
register_setting('duo_settings', 'duo_xmlrpc', 'duo_xmlrpc_validate');
}
}
开发者ID:kalwar,项目名称:duo_wordpress,代码行数:28,代码来源:duo_wordpress.php
示例8: _mw_adminimize_options
//.........这里部分代码省略.........
<th><?php
_e('Display name publicly as');
?>
</th>
<th><?php
_e('Admin-Color Scheme');
?>
</th>
<th><?php
_e('User Level');
?>
</th>
<th><?php
_e('Role');
?>
</th>
</tr>
</thead>
<tbody id="users" class="list:user user-list">
<?php
$wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM {$wpdb->users} ORDER BY ID");
$style = '';
foreach ($wp_user_search as $userid) {
$user_id = (int) $userid->ID;
$user_login = stripslashes($userid->user_login);
$display_name = stripslashes($userid->display_name);
$current_color = get_user_option('admin_color', $user_id);
$user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
$user_object = new WP_User($user_id);
$roles = $user_object->roles;
$role = array_shift($roles);
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($wp_roles->role_names[$role]);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($wp_roles->role_names[$role], 'User role');
} else {
$role_name = strrpos($wp_roles->role_names[$role], '|');
}
$style = ' class="alternate"' == $style ? '' : ' class="alternate"';
$return = '';
$return .= '<tr>' . "\n";
$return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_id . '</td>' . "\n";
$return .= "\t" . '<td>' . $user_login . '</td>' . "\n";
$return .= "\t" . '<td>' . $display_name . '</td>' . "\n";
$return .= "\t" . '<td>' . $current_color . '</td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_level . '</td>' . "\n";
$return .= "\t" . '<td>' . $role_name . '</td>' . "\n";
$return .= '</tr>' . "\n";
echo $return;
}
?>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>
<select name="_mw_adminimize_set_theme">
<?php
foreach ($_wp_admin_css_colors as $color => $color_info) {
?>
<option value="<?php
echo $color;
?>
"><?php
开发者ID:ahsaeldin,项目名称:projects,代码行数:67,代码来源:adminimize_page.php
示例9: test_before_last_bar
/**
* @ticket 35073
*/
function test_before_last_bar()
{
$this->assertEquals('no-bar-at-all', before_last_bar('no-bar-at-all'));
$this->assertEquals('before-last-bar', before_last_bar('before-last-bar|after-bar'));
$this->assertEquals('first-before-bar|second-before-bar', before_last_bar('first-before-bar|second-before-bar|after-last-bar'));
}
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:9,代码来源:l10n.php
示例10: foreach
<?php
$wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM {$wpdb->users} ORDER BY ID");
$style = '';
foreach ($wp_user_search as $userid) {
$user_id = (int) $userid->ID;
$user_login = stripslashes($userid->user_login);
$display_name = stripslashes($userid->display_name);
$current_color = get_user_option('admin_color', $user_id);
$user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
$user_object = new WP_User($user_id);
$roles = $user_object->roles;
$role = array_shift($roles);
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($wp_roles->role_names[$role]);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($wp_roles->role_names[$role], 'User role');
} else {
$role_name = strrpos($wp_roles->role_names[$role], '|');
}
$style = ' class="alternate"' == $style ? '' : ' class="alternate"';
$return = '';
$return .= '<tr>' . "\n";
$return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_id . '</td>' . "\n";
$return .= "\t" . '<td>' . $user_login . '</td>' . "\n";
$return .= "\t" . '<td>' . $display_name . '</td>' . "\n";
$return .= "\t" . '<td>' . $current_color . '</td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_level . '</td>' . "\n";
$return .= "\t" . '<td>' . $role_name . '</td>' . "\n";
$return .= '</tr>' . "\n";
echo $return;
开发者ID:pariscunningham,项目名称:OmahaBeerWeek,代码行数:31,代码来源:theme_options.php
示例11: translate_with_context
function translate_with_context($text, $domain = 'default')
{
return before_last_bar(translate($text, $domain));
}
开发者ID:nouphet,项目名称:rata,代码行数:4,代码来源:functions_for_wp_old.php
示例12: rublon2factor_render_protection_types
/**
* Render "Email-based identity confirmation" settings.
*
* Callback for rendering the "Email-based identity confirmation"
* section settings on the plugin's page.
*
* @return void
*/
function rublon2factor_render_protection_types()
{
echo '<p class="rublon-settings-desc">' . __('Every user is protected via email by default. You can turn this off for selected roles. For more security, you can also require selected roles to use the Rublon mobile app.', 'rublon') . '</p>';
echo '<p class="rublon-settings-desc"><strong>' . __('Notice:', 'rublon') . ' </strong>' . __('Users of the Rublon mobile app are always protected, regardless of this setting. Users with no minimum protection can turn on protection via email themselves in their profile. Users with any level of minimum protection cannot turn it off.', 'rublon') . '</p>';
$settings = RublonHelper::getSettings('additional');
// Retrieve the roles used on this site.
$roles = RublonHelper::getUserRoles();
$role_ids = array();
echo '<div class="rublon-settings-setting-name">';
echo ' <div class="rublon-settings-setting-label"></div>';
echo ' <div class="rublon-setting-header"><strong>' . __('Minimum Protection', 'rublon') . '</strong></div>';
echo '</div>';
foreach ($roles as $role) {
$checked = '';
// Prepare role IDs used as the option keys.
$role_id = RublonHelper::prepareRoleId($role);
$role_ids[] = '\'' . $role_id . '\'';
if (!empty($settings[$role_id])) {
$mobileSelected = '';
$emailSelected = '';
$noneSelected = '';
$lock1Visibility = '';
$lock2Visibility = '';
$lock3Visibility = '';
// switch ($settings[$role_id]) {
switch (RublonRolesProtection::getRoleProtectionType($role)) {
case RublonHelper::PROTECTION_TYPE_MOBILE_EVERYTIME:
$mobileEverytimeSelected = ' selected';
$lock1Visibility = 'hidden';
$lock2Visibility = 'visible';
$lock3Visibility = 'visible';
$lock4Visibility = 'visible';
break;
case RublonHelper::PROTECTION_TYPE_MOBILE:
$mobileSelected = ' selected';
$lock1Visibility = 'hidden';
$lock2Visibility = 'visible';
$lock3Visibility = 'visible';
$lock4Visibility = 'hidden';
break;
case RublonHelper::PROTECTION_TYPE_EMAIL:
$emailSelected = ' selected';
$lock1Visibility = 'hidden';
$lock2Visibility = 'visible';
$lock3Visibility = 'hidden';
$lock4Visibility = 'hidden';
break;
case RublonHelper::PROTECTION_TYPE_NONE:
$noneSelected = ' selected';
$lock1Visibility = 'visible';
$lock2Visibility = 'hidden';
$lock3Visibility = 'hidden';
$lock4Visibility = 'hidden';
break;
}
}
if (!empty($settings[$role_id]) && $settings[$role_id] == 'on') {
$checked = ' checked';
}
echo '<div class="rublon-settings-setting-name">';
echo ' <label for="rublon-role-' . $role_id . '-dropdown" class="rublon-settings-setting-label"><div class="rublon-settings-setting-label">' . translate_user_role(before_last_bar($role)) . '</div></label>';
echo ' <select id="rublon-role-' . $role_id . '-dropdown" name="' . RublonHelper::RUBLON_ADDITIONAL_SETTINGS_KEY . '[' . $role_id . ']">';
$forceMobileApp = RublonFeature::checkFeature(RublonAPIGetAvailableFeatures::FEATURE_FORCE_MOBILE_APP);
if ($forceMobileApp and RublonFeature::checkFeature(RublonAPIGetAvailableFeatures::FEATURE_IGNORE_TRUSTED_DEVICE)) {
echo ' <option value="mobileEverytime"' . $mobileEverytimeSelected . '>' . __('Mobile app everytime', 'rublon') . '</option>';
}
if ($forceMobileApp) {
echo ' <option value="mobile"' . $mobileSelected . '>' . __('Mobile app', 'rublon') . '</option>';
}
echo ' <option value="email"' . $emailSelected . '>' . __('Email', 'rublon') . '</option>';
echo ' <option value="none"' . $noneSelected . '>' . __('None', 'rublon') . '</option>';
echo ' </select>';
echo '<label class="rublon-label rublon-label-' . $role_id . '" for="rublon-role-' . $role_id . '-dropdown">';
echo ' <div class="rublon-lock-container rublon-unlocked-container rublon-' . $role_id . '-unlocked ' . $lock1Visibility . '"><img class="rublon-lock rublon-unlocked" src="' . RUBLON2FACTOR_PLUGIN_URL . '/assets/images/unlocked.png" /></div>';
echo ' <div class="rublon-lock-container rublon-locked-container rublon-' . $role_id . '-locked ' . $lock2Visibility . '"><img class="rublon-lock rublon-locked" src="' . RUBLON2FACTOR_PLUGIN_URL . '/assets/images/locked.png" /></div>';
echo ' <div class="rublon-lock-container rublon-locked-container rublon-' . $role_id . '-locked2 ' . $lock3Visibility . '"><img class="rublon-lock rublon-locked" src="' . RUBLON2FACTOR_PLUGIN_URL . '/assets/images/locked.png" /></div>';
echo ' <div class="rublon-lock-container rublon-locked-container rublon-' . $role_id . '-locked3 ' . $lock4Visibility . '"><img class="rublon-lock rublon-locked" src="' . RUBLON2FACTOR_PLUGIN_URL . '/assets/images/locked.png" /></div>';
echo '</label>';
echo '</div>';
}
echo '<script>//<![CDATA[
if (RublonWP) {
RublonWP.roles = [' . implode(', ', $role_ids) . '];
RublonWP.setUpRoleProtectionTypeChangeListener();
}
//]]></script>';
}
开发者ID:khanhnd91,项目名称:khaosan,代码行数:95,代码来源:rublon2factor_admin.php
示例13: _mw_adminimize_options
//.........这里部分代码省略.........
<th><?php
_e('Display name publicly as');
?>
</th>
<th><?php
_e('Admin-Color Scheme');
?>
</th>
<th><?php
_e('User Level');
?>
</th>
<th><?php
_e('Role');
?>
</th>
</tr>
</thead>
<tbody id="users" class="list:user user-list">
<?php
$wp_user_search = $wpdb->get_results("SELECT ID, user_login, display_name FROM {$wpdb->users} ORDER BY ID");
$style = '';
foreach ($wp_user_search as $userid) {
$user_id = (int) $userid->ID;
$user_login = stripslashes($userid->user_login);
$display_name = stripslashes($userid->display_name);
$current_color = get_user_option('admin_color', $user_id);
$user_level = (int) get_user_option($table_prefix . 'user_level', $user_id);
$user_object = new WP_User($user_id);
$roles = $user_object->roles;
$role = array_shift($roles);
if (function_exists('translate_user_role')) {
$role_name = translate_user_role($wp_roles->role_names[$role]);
} elseif (function_exists('before_last_bar')) {
$role_name = before_last_bar($wp_roles->role_names[$role], 'User role');
} else {
$role_name = strrpos($wp_roles->role_names[$role], '|');
}
$style = ' class="alternate"' == $style ? '' : ' class="alternate"';
$return = '';
$return .= '<tr>' . "\n";
$return .= "\t" . '<td><input type="checkbox" name="mw_adminimize_theme_items[]" value="' . $user_id . '" /></td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_id . '</td>' . "\n";
$return .= "\t" . '<td>' . $user_login . '</td>' . "\n";
$return .= "\t" . '<td>' . $display_name . '</td>' . "\n";
$return .= "\t" . '<td>' . $current_color . '</td>' . "\n";
$return .= "\t" . '<td class="num">' . $user_level . '</td>' . "\n";
$return .= "\t" . '<td>' . $role_name . '</td>' . "\n";
$return .= '</tr>' . "\n";
echo $return;
}
?>
<tr valign="top">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td>
<select name="_mw_adminimize_set_theme">
<?php
foreach ($_wp_admin_css_colors as $color => $color_info) {
?>
<option value="<?php
echo $color;
?>
"><?php
开发者ID:xenda,项目名称:camaraitalia,代码行数:67,代码来源:adminimize_page.php
示例14: html_date_helper
static function html_date_helper($prefix, $time = 0, $tab_index = 0, $select_class = '')
{
global $wp_locale;
$tab_index_attribute = '';
$tab_index = (int) $tab_index;
if ($tab_index > 0) {
$tab_index_attribute = " tabindex=\"{$tab_index}\"";
}
$select_class_attribute = '';
if (!empty($select_class)) {
$select_class_attribute = ' class="' . esc_attr($select_class) . '"';
}
if ($time == 0) {
$time_adj = \WP_Clanwars\Utils::current_time_fixed('timestamp', 0);
} else {
$time_adj = $time;
}
$jj = date('d', $time_adj);
$mm = date('m', $time_adj);
$hh = date('H', $time_adj);
$mn = date('i', $time_adj);
$yy = date('Y', $time_adj);
$month = "<select name=\"{$prefix}[mm]\"{$select_class_attribute}{$tab_index_attribute}>\n";
for ($i = 1; $i < 13; $i = $i + 1) {
$month .= "\t\t\t" . '<option value="' . zeroise($i, 2) . '"';
if ($i == $mm) {
$month .= ' selected="selected"';
}
$month .= '>' . $wp_locale->get_month($i) . "</option>\n";
}
$month .= '</select>';
$day = '<input type="text" name="' . $prefix . '[jj]" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
$hour = '<input type="text" name="' . $prefix . '[hh]" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
$minute = '<input type="text" name="' . $prefix . '[mn]" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
$year = '<input type="text" name="' . $prefix . '[yy]" value="' . $yy . '" size="3" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
printf(before_last_bar(__('%1$s%5$s %2$s @ %3$s : %4$s|1: month input, 2: day input, 3: hour input, 4: minute input, 5: year input', WP_CLANWARS_TEXTDOMAIN)), $month, $day, $hour, $minute, $year);
}
开发者ID:pronebird,项目名称:wp-clanwars,代码行数:37,代码来源:utils.class.php
注:本文中的before_last_bar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论