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


PHP gp_breadcrumb函数代码示例

本文整理汇总了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">&rarr;</span>', '</li><li>', $breadcrumbs);
     $breadcrumbs = str_replace('<span class="breadcrumb"></li>', '<ol class="breadcrumb">', $breadcrumbs);
     $breadcrumbs = str_replace('</a></span>', '</a> &nbsp;', $breadcrumbs);
     $breadcrumbs = $breadcrumbs . '</ol>';
     echo $breadcrumbs;
 }
开发者ID:WeFoster,项目名称:translate.wefoster.co,代码行数:10,代码来源:hacks.php

示例2: gp_title

<?php

gp_title(sprintf(__('Permissions &lt; %s &lt; %s &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; %s &lt; %s &lt; 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 &lt; 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(' &bull;&nbsp;', $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 &lt; %s &lt; %s &lt; 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 &lt; 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 &lt; 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 &lt; 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 &lt; 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


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