本文整理汇总了PHP中Campaign::getStrings方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::getStrings方法的具体用法?PHP Campaign::getStrings怎么用?PHP Campaign::getStrings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::getStrings方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: column_domain
function column_domain($item)
{
$actions = array();
$actions['delete'] = "<a href='" . CAMPAIGN_DELETE_URL . "&id={$item->id}' onclick=\"if (confirm('" . Campaign::getStrings('remover') . "')) { return true; } return false;\">Remover</a>";
if (is_super_admin()) {
$actions['edit'] = "<a href='" . CAMPAIGN_EDIT_URL . "&id={$item->id}'>Editar</a>";
}
$actions['admin'] = "<a href='{$item->domain}/wp-admin'>Painel</a>";
//Return the title contents
return sprintf('%1$s %2$s', "<a href='{$item->domain}' target='_blank'>{$item->domain}</a>", $this->row_actions($actions));
}
示例2: campanha_add_common_js
/**
* Add JS files shared by all themes.
*/
function campanha_add_common_js()
{
wp_enqueue_script('jquery');
wp_enqueue_script('campaign_common', site_url() . '/wp-content/mu-plugins/js/campaign_common.js', 'jquery');
Campaign::getStrings();
}
示例3: campanha_custom_menus
function campanha_custom_menus()
{
register_nav_menus(array('main' => __('Principal', 'redelivre'), 'sobre' => Campaign::getStrings('Sobre'), 'info' => __('Informações Legais', 'redelivre')));
}
示例4: array
$errors = array('error' => Campaign::getStrings('NaoFoiPossivelCriar'));
}
} else {
$errors = $campaign->errorHandler->errors;
}
}
// hack to make the redirection above work (without using noheader
// the call to wp_redirect generate a headers already sent warning)
if (isset($_GET['noheader'])) {
require_once ABSPATH . 'wp-admin/admin-header.php';
}
?>
<div class="wrap">
<h2 id="form_title"><?php
echo Campaign::getStrings('NovoProjeto');
?>
</h2>
<?php
if (!empty($errors)) {
print_msgs($errors);
}
?>
<form action="<?php
echo admin_url(CAMPAIGN_NEW_URL) . '&noheader';
?>
" method="post" enctype="multipart/form-data">
<table class="form-table">
<tbody>
示例5: filter_input
$campaign->state = filter_input(INPUT_POST, 'state', FILTER_SANITIZE_NUMBER_INT);
$campaign->city = filter_input(INPUT_POST, 'city', FILTER_SANITIZE_NUMBER_INT);
$campaign->observations = filter_input(INPUT_POST, 'observations', FILTER_SANITIZE_STRING);
$campaign->status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);
if ($campaign->validate()) {
$campaign->update();
$msgs = array('updated' => Campaign::getStrings('AtualizadoSucesso'));
} else {
$msgs = $campaign->errorHandler->errors;
}
}
?>
<div class="wrap">
<h2 id="form_title"><?php
echo Campaign::getStrings('Editar') . " {$campaign->domain}";
?>
</h2>
<?php
if (!empty($msgs)) {
print_msgs($msgs);
}
?>
<form action="<?php
echo admin_url(CAMPAIGN_EDIT_URL) . "&id={$campaign->id}";
?>
" method="post" enctype="multipart/form-data">
<table class="form-table">
<tbody>
示例6: admin_strings_tpl_loop
<?php
Campaign::saveDefinedSettingsStrings();
echo '<form action="" method="post" enctype="multipart/form-data">';
$campaignDefinedSettingsStrings = Campaign::getStrings();
admin_strings_tpl_loop($campaignDefinedSettingsStrings);
foreach ($campaignDefinedSettingsStrings as $key => $value) {
if ($key != 'value' && $key != 'label') {
admin_strings_tpl_loop($campaignDefinedSettingsStrings[$key], $key);
}
}
echo '<input type="submit" value="Salvar">';
echo '</form>';
function admin_strings_tpl_loop($list, $prefix = '')
{
foreach ($list['label'] as $key => $label) {
echo '<p><label>' . $label . '</label><br><input type="text" value="' . $list['value'][$key] . '" name="' . $prefix . 'settings_strings[' . $key . ']" size="80"></p>';
}
}
示例7: add_action
<?php
add_action('admin_menu', function () {
$base_page = 'platform-strings';
add_object_page(__(Campaign::getStrings('MenuPlataforma'), 'redelivre'), __(Campaign::getStrings('MenuPlataforma'), 'redelivre'), 'manage_options', $base_page, array());
add_submenu_page($base_page, __('Strings', 'redelivre'), __('Strings', 'redelivre'), 'manage_options', $base_page, function () {
require MUCAMPANHAPATH . '/admin-strings-tpl.php';
});
add_submenu_page($base_page, __('Settings', 'redelivre'), __('Settings', 'redelivre'), 'manage_options', 'platform-settings', function () {
require MUCAMPANHAPATH . '/admin-settings-tpl.php';
});
add_menu_page(Campaign::getStrings('MenuPrincipal'), Campaign::getStrings('MenuPrincipal'), 'read', 'campaigns', function () {
require MUCAMPANHAPATH . '/includes/campaigns.php';
});
add_submenu_page('campaigns', Campaign::getStrings('NovoProjeto'), Campaign::getStrings('NovoProjeto'), 'read', 'campaigns_new', function () {
require MUCAMPANHAPATH . '/includes/campaigns_new.php';
});
});
示例8: admin_url
<?php
if ($campaignTable->prepare_items()) {
?>
<form action="" method="get" id="ms-search">
<?php
$campaignTable->search_box(__(Campaign::getStrings('ProcurarProjeto')), 'projetos');
?>
<input type="hidden" name="action" value="projetos" />
<input type="hidden" name="page" value="campaigns" />
</form>
<?php
$campaignTable->display();
?>
<?php
} else {
?>
<p><?php
echo Campaign::getStrings('NaoCriou1');
?>
<a href="<?php
echo admin_url(CAMPAIGN_NEW_URL);
?>
"><?php
echo Campaign::getStrings('NaoCriou2');
?>
</a>.</p>
<?php
}
?>
</div>
示例9: alertStaff
/**
* Send an e-mail to the site staff when a new
* campaign is created with its own domain so that
* they can configure manually configure the server
* to respond to it.
*
* @return null
*/
protected function alertStaff()
{
$userName = $this->campaignOwner->data->user_login;
$to = get_bloginfo('admin_email');
$subject = Campaign::getStrings('DominioProprio') . " {$this->own_domain}";
$message = "O usuário {$userName} " . self::getStrings('CriouNovo') . " <a href='{$this->domain}'>{$this->domain}</a> e o domínio próprio <a href='{$this->own_domain}'>{$this->own_domain}</a>.";
$headers = "content-type: text/html \r\n";
wp_mail($to, $subject, $message, $headers);
}