本文整理汇总了PHP中gp_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP gp_breadcrumb函数的具体用法?PHP gp_breadcrumb怎么用?PHP gp_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gp_breadcrumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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>
示例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
示例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'));
?>
示例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)) {
示例6: gp_breadcrumb_project
function gp_breadcrumb_project($project)
{
return gp_breadcrumb(gp_project_links_from_root($project));
}
示例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');
示例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();
示例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();
示例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
}
?>
示例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');
?>
示例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
}
示例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';
示例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
示例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')) {