本文整理汇总了PHP中gp_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP gp_breadcrumb函数的具体用法?PHP gp_breadcrumb怎么用?PHP gp_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gp_breadcrumb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: gp_breadcrumb
public static function gp_breadcrumb()
{
// We can't change the template of breadcrumbs so some string replaces to correct it.
$breadcrumbs = gp_breadcrumb();
$breadcrumbs = str_replace('<span class="separator">→</span>', '</li><li>', $breadcrumbs);
$breadcrumbs = str_replace('<span class="breadcrumb"></li>', '<ol class="breadcrumb">', $breadcrumbs);
$breadcrumbs = str_replace('</a></span>', '</a> ', $breadcrumbs);
$breadcrumbs = $breadcrumbs . '</ol>';
echo $breadcrumbs;
}
开发者ID:WeFoster,项目名称:translate.wefoster.co,代码行数:10,代码来源:hacks.php
示例2: gp_title
<?php
gp_title(sprintf(__('Permissions < %s < %s < GlotPress'), $translation_set->name, $project->name));
gp_breadcrumb(array(gp_link_project_get($project, $project->name), $locale->english_name, 'default' != $translation_set->slug ? $translation_set->name : '', 'Permissions'));
gp_tmpl_header();
?>
<h2>Permissions</h2>
<ul id="translation-set-permissions">
<?php
foreach ($permissions as $permission) {
?>
<li>
<span class="permission-action">user</span>
<span class="user"><?php
echo esc_html($permission->user->user_login);
?>
</span>
<span class="permission-action">can <?php
echo esc_html($permission->action);
?>
</span>
<a href="<?php
echo gp_url_join(gp_url_current(), '_delete/' . $permission->id);
?>
" class="action delete">Remove</a>
</li>
<?php
}
if (!$permissions) {
?>
<strong>No validators defined for this translation set.</strong>
开发者ID:rmccue,项目名称:GlotPress,代码行数:31,代码来源:translation-set-permissions.php
示例3: gp_title
<?php
gp_title(__('Create New Project < GlotPress', 'glotpress'));
gp_breadcrumb(array(__('Create New Project', 'glotpress')));
gp_tmpl_header();
?>
<h2><?php
_e('Create New Project', 'glotpress');
?>
</h2>
<form action="" method="post">
<?php
gp_tmpl_load('project-form', get_defined_vars());
?>
<p>
<input type="submit" name="submit" value="<?php
esc_attr_e('Create', 'glotpress');
?>
" id="submit" />
<span class="or-cancel"><?php
_e('or', 'glotpress');
?>
<a href="<?php
echo gp_url();
?>
"><?php
_e('Cancel', 'glotpress');
?>
</a></span>
</p>
<?php
开发者ID:ramiy,项目名称:GlotPress-WP,代码行数:31,代码来源:project-new.php
示例4: gp_title
<?php
gp_title(__('Projects < GlotPress'));
gp_breadcrumb(array(__('Projects')));
gp_tmpl_header();
?>
<h2>Projects</h2>
<ul>
<?php
foreach ($projects as $project) {
?>
<li><?php
gp_link_project($project, esc_html($project->name));
?>
<?php
gp_link_project_edit($project);
?>
<?php
gp_link_project_delete($project);
?>
</li>
<?php
}
?>
</ul>
<?php
if (GP::$user->current()->can('write', 'project')) {
?>
<p class="actionlist secondary"><?php
gp_link(gp_url_project('_new'), __('Create a New Project'));
?>
开发者ID:rmccue,项目名称:GlotPress,代码行数:31,代码来源:projects.php
示例5: gp_title
<?php
gp_title(__('Profile < GlotPress'));
gp_breadcrumb(array(__('Profile')));
gp_tmpl_header();
?>
<h2><?php
echo $user->display_name;
?>
<?php
if ($user->admin()) {
_e('(Admin)');
}
?>
</h2>
<div>
<div class="user-card">
<div class="user-avatar"><img src="<?php
echo $user->get_avatar();
?>
" /> </div>
<dl class="user-info">
<dd><?php
$locale_keys = array_keys($locales);
if (1 < count($locales)) {
vprintf(__('%s is a polyglot who knows %s but also knows %s.'), array_merge(array($user->display_name), $locale_keys));
} else {
if (!empty($locale_keys)) {
开发者ID:pedro-mendonca,项目名称:GlotPress-WP,代码行数:31,代码来源:profile-public.php
示例6: gp_breadcrumb_project
function gp_breadcrumb_project($project)
{
return gp_breadcrumb(gp_project_links_from_root($project));
}
开发者ID:rmccue,项目名称:glotpress-plugin,代码行数:4,代码来源:template.php
示例7: gp_title
<?php
gp_title(__('View Glossary < GlotPress', 'glotpress'));
gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get(gp_url_project_locale($project->path, $locale->slug, $translation_set->slug), $translation_set->name), __('Glossary', 'glotpress')));
$ge_delete_ays = __('Are you sure you want to delete this entry?', 'glotpress');
$delete_url = $url . '/-delete';
$glossary_options = compact('can_edit', 'url', 'delete_url', 'ge_delete_ays');
gp_enqueue_script('gp-glossary');
wp_localize_script('gp-glossary', '$gp_glossary_options', $glossary_options);
gp_tmpl_header();
?>
<h2><?php
printf(_x('Glossary for %1$s translation of %2$s', '{language} / { project name}', 'glotpress'), esc_html($translation_set->name), esc_html($project->name));
?>
<?php
gp_link_glossary_edit($glossary, $translation_set, __('(edit)', 'glotpress'));
?>
</h2>
<?php
if ($glossary->description) {
echo '<p class="description">' . make_clickable(nl2br(wp_kses_post($glossary->description))) . '</p>';
}
?>
<table class="glossary" id="glossary">
<thead>
<tr>
<th style="width:20%"><?php
_ex('Item', 'glossary entry', 'glotpress');
开发者ID:johnjamesjacoby,项目名称:GlotPress-WP,代码行数:31,代码来源:glossary-view.php
示例8: gp_title
<?php
gp_title(__('Create New Project < GlotPress'));
gp_breadcrumb(array(__('Create New Project')));
gp_tmpl_header();
?>
<h2><?php
_e('Create New Project');
?>
</h2>
<form action="" method="post">
<?php
gp_tmpl_load('project-form', get_defined_vars());
?>
<p><input type="submit" name="submit" value="<?php
echo esc_attr(__('Create'));
?>
" id="submit" /></p>
</form>
<?php
gp_tmpl_footer();
开发者ID:rmccue,项目名称:GlotPress,代码行数:21,代码来源:project-new.php
示例9: gp_title
<?php
gp_title(sprintf(__('Edit Translation Set < %s < %s < GlotPress'), $set->name, $project->name));
gp_breadcrumb(array(gp_link_project_get($project, $project->name), gp_link_get($url, $locale->english_name . 'default' != $set->slug ? ' ' . $set->name : '')));
gp_tmpl_header();
?>
<h2><?php
_e('Edit Translation Set');
?>
</h2>
<form action="" method="post">
<?php
gp_tmpl_load('translation-set-form', get_defined_vars());
?>
<p>
<input type="submit" name="submit" value="<?php
echo esc_attr(__('Save'));
?>
" id="submit" />
<span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span>
</p>
</form>
<?php
gp_tmpl_footer();
开发者ID:pedro-mendonca,项目名称:GlotPress-WP,代码行数:24,代码来源:translation-set-edit.php
示例10: gp_title
<?php
gp_title(sprintf(__('Projects translated to %s < GlotPress'), esc_html($locale->english_name)));
$breadcrumb = array();
$breadcrumb[] = gp_link_get('/languages', __('Locales'));
if ('default' == $current_set_slug) {
$breadcrumb[] = esc_html($locale->english_name);
} else {
$breadcrumb[] = gp_link_get(gp_url_join('/languages', $locale->slug), esc_html($locale->english_name));
$breadcrumb[] = $set_list[$current_set_slug];
}
gp_breadcrumb($breadcrumb);
gp_tmpl_header();
?>
<h2><?php
printf(__('Active Projects translated to %s'), '<span>' . esc_html($locale->english_name) . '</span>');
?>
</h2>
<?php
if (count($set_list) > 1) {
?>
<p class="actionlist secondary">
<?php
echo implode(' • ', $set_list);
?>
</p>
<?php
}
?>
开发者ID:BoweFrankema,项目名称:WP-Translate-Theme,代码行数:31,代码来源:locale.php
示例11: gp_title
<?php
/**
* Templates: Delete Translation Set
*
* @package GlotPress
* @subpackage Templates
* @since 2.0.0
*/
gp_title(sprintf(__('Delete Translation Set < %s < %s < GlotPress', 'glotpress'), $set->name, $project->name));
gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get($url, $locale->english_name . ('default' !== $set->slug ? ' ' . $set->name : ''))));
gp_tmpl_header();
?>
<h2><?php
_e('Delete Translation Set', 'glotpress');
?>
</h2>
<form action="" method="post">
<p>
<?php
_e('Note this will delete all translations associated with this set!', 'glotpress');
?>
</p>
<p>
<input type="submit" name="submit" value="<?php
esc_attr_e('Delete', 'glotpress');
?>
" id="submit" />
<span class="or-cancel"><?php
_e('or', 'glotpress');
?>
开发者ID:ramiy,项目名称:GlotPress-WP,代码行数:31,代码来源:translation-set-delete.php
示例12: gp_title
<?php
gp_title(sprintf(__('%s < GlotPress'), esc_html($project->name)));
gp_breadcrumb(array(gp_link_project_get($project, $project->name)));
wp_enqueue_script('common');
gp_tmpl_header();
if ($sub_projects) {
?>
<ul>
<?php
foreach ($sub_projects as $sub_project) {
?>
<li>
<?php
gp_link_project($sub_project, esc_html($sub_project->name));
?>
<?php
gp_link_project_edit($sub_project);
?>
<?php
gp_link_project_delete($sub_project);
?>
</li>
<?php
}
?>
</ul>
<?php
}
开发者ID:rmccue,项目名称:GlotPress,代码行数:31,代码来源:project.php
示例13: gp_title
<?php
/**
* The settings page
*
* Displays the settings page for a user.
*
* @link http://glotpress.org
*
* @package GlotPress
* @since 2.0.0
*/
gp_title(__('Your Settings < GlotPress', 'glotpress'));
gp_breadcrumb(array(__('Your Settings', 'glotpress')));
gp_tmpl_header();
$per_page = (int) get_user_option('gp_per_page');
if (0 === $per_page) {
$per_page = 15;
}
$default_sort = get_user_option('gp_default_sort');
if (!is_array($default_sort)) {
$default_sort = array('by' => 'priority', 'how' => 'desc');
}
?>
<h2><?php
_e('Your Settings', 'glotpress');
?>
</h2>
<form action="" method="post">
<?php
include_once __DIR__ . '/settings-edit.php';
开发者ID:ramiy,项目名称:GlotPress-WP,代码行数:31,代码来源:settings.php
示例14: gp_title
<?php
gp_title(sprintf(__('Projects translated to %s < GlotPress'), esc_html($locale->english_name)));
gp_breadcrumb(array(gp_link_get('/languages', __('Locales')), esc_html($locale->english_name)));
gp_tmpl_header();
?>
<h2><?php
printf(__('Active Projects translated to %s'), '<span>' . esc_html($locale->english_name) . '</span>');
?>
</h2>
<?php
if (empty($projects_data)) {
_e('No active projects found.');
}
?>
<?php
foreach ($projects_data as $project_id => $sub_projects) {
?>
<div class="locale-project">
<h3><?php
echo $projects[$project_id]->name;
?>
</h3>
<table class="locale-sub-projects table table-striped">
<thead>
<tr>
<th class="header" <?php
开发者ID:WeFoster,项目名称:translate.wefoster.co,代码行数:31,代码来源:locale.php
示例15: gp_title
<?php
gp_title(__('Projects < GlotPress', 'glotpress'));
gp_breadcrumb(array(__('Projects', 'glotpress')));
gp_tmpl_header();
?>
<h2><?php
_e('Projects', 'glotpress');
?>
</h2>
<ul>
<?php
foreach ($projects as $project) {
?>
<li><?php
gp_link_project($project, esc_html($project->name));
?>
<?php
gp_link_project_edit($project, null, array('class' => 'bubble'));
?>
</li>
<?php
}
?>
</ul>
<p class="actionlist secondary">
<?php
if (current_user_can('manage_options')) {
开发者ID:akirk,项目名称:GlotPress,代码行数:31,代码来源:projects.php
示例16: gp_title
<?php
gp_title(__('Profile < GlotPress', 'glotpress'));
gp_breadcrumb(array(__('Profile', 'glotpress')));
gp_tmpl_header();
?>
<h2><?php
echo $user->display_name;
?>
</h2>
<div>
<div class="user-card">
<div class="user-avatar"><?php
echo get_avatar($user->user_email, 100);
?>
</div>
<dl class="user-info">
<dd><?php
$locale_keys = array_keys($locales);
if (1 < count($locales)) {
/* translators: 1: display name of a user, 2: language, 3: language */
vprintf(__('%1$s is a polyglot who knows %2$s but also knows %3$s.', 'glotpress'), array_merge(array($user->display_name), $locale_keys));
} else {
if (!empty($locale_keys)) {
/* translators: 1: display name of a user, 2: language */
printf(__('%1$s is a polyglot who contributes to %2$s', 'glotpress'), $user->display_name, $locale_keys[0]);
}
}
开发者ID:GlotPress,项目名称:GlotPress-WP,代码行数:31,代码来源:profile-public.php
示例17: gp_title
<?php
gp_title(sprintf(__('%s < GlotPress'), __('Login')));
gp_breadcrumb(array(__('Login')));
gp_tmpl_header();
?>
<form action="<?php
echo gp_url_ssl(gp_url_current());
?>
" method="post" class="form-signin" role="form">
<h2 class="form-signin-heading"><?php
_e('Login');
?>
</h2>
<?php
do_action('before_login_form');
?>
<input name="user_login" type="text" class="form-control" placeholder="<?php
_e('Username');
?>
" required="" autofocus="">
<input name="user_pass" type="password" class="form-control" placeholder="<?php
_e('Password');
?>
" required="">
<input type="hidden" value="<?php
echo esc_attr(gp_get('redirect_to'));
开发者ID:BoweFrankema,项目名称:WP-Translate-Theme,代码行数:31,代码来源:login.php
示例18: apply_filters
>
<script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
<div class="gp-content">
<div id="gp-js-message"></div>
<h1>
<a class="logo" href="<?php
echo apply_filters('gp_logo_url', gp_url('/'));
?>
" rel="home">
<img alt="GlotPress" src="<?php
echo apply_filters('gp_logo_img_url', gp_url_img('glotpress-logo.png'));
?>
" />
</a>
<?php
echo gp_breadcrumb();
?>
<span id="hello">
<?php
if (GP::$user->logged_in()) {
$user = GP::$user->current();
printf(__('Hi, %s.'), '<a href="' . gp_url('/profile') . '">' . $user->user_login . '</a>');
$logout_string = '<a href="' . gp_url('/logout') . '">' . __('Log out') . '</a>';
echo apply_filters('gp_logout_link', $logout_string);
?>
<?php
} elseif (!GP_INSTALLING) {
$login_string = '<strong><a href="' . gp_url_login() . '">' . __('Log in') . '</a></strong>';
echo apply_filters('gp_login_link', $login_string);
}
?>
开发者ID:Tucev,项目名称:Glot-O-Matic,代码行数:31,代码来源:header.php
示例19: gp_title
<?php
gp_title(__('Install < GlotPress'));
gp_breadcrumb(array('upgrade' == $action ? __('Upgrade') : __('Install')));
wp_enqueue_style('install');
gp_tmpl_header();
?>
<?php
if (isset($errors)) {
_e('There were some errors:');
echo '<pre class="message">';
echo implode("\n", $errors);
echo '</pre>';
} else {
if (isset($success_message)) {
echo '<p>' . $success_message . '</p>';
}
}
?>
<?php
// TODO: deny access to scripts folder
if ($show_htaccess_instructions) {
?>
<p>
<?php
_e('If your <code>.htaccess</code> file was writeable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.');
?>
<pre><?php
开发者ID:Tucev,项目名称:Glot-O-Matic,代码行数:31,代码来源:install.php
示例20: gp_title
<?php
gp_title(sprintf(__('Translations < %s < %s < GlotPress', 'glotpress'), $translation_set->name, $project->name));
gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get($url, $translation_set->name)));
gp_enqueue_script('jquery-ui-core');
gp_enqueue_script('gp-editor');
gp_enqueue_script('gp-translations-page');
wp_localize_script('gp-translations-page', '$gp_translations_options', array('sort' => __('Sort', 'glotpress'), 'filter' => __('Filter', 'glotpress')));
// localizer adds var in front of the variable name, so we can't use $gp.editor.options
$editor_options = compact('can_approve', 'can_write', 'url', 'discard_warning_url', 'set_priority_url', 'set_status_url');
wp_localize_script('gp-editor', '$gp_editor_options', $editor_options);
gp_tmpl_header();
$i = 0;
?>
<h2>
<?php
printf(__('Translation of %s', 'glotpress'), esc_html($project->name));
?>
: <?php
echo esc_html($translation_set->name);
?>
<?php
gp_link_set_edit($translation_set, $project, __('(edit)', 'glotpress'));
?>
<?php
if ($glossary) {
?>
<?php
echo gp_link($glossary->path(), __('glossary', 'glotpress'), array('class' => 'glossary-link'));
?>
<?php
开发者ID:akirk,项目名称:GlotPress,代码行数:31,代码来源:translations.php
注:本文中的gp_breadcrumb函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论