本文整理匯總了PHP中Bulk_Upgrader_Skin::add_strings方法的典型用法代碼示例。如果您正苦於以下問題:PHP Bulk_Upgrader_Skin::add_strings方法的具體用法?PHP Bulk_Upgrader_Skin::add_strings怎麽用?PHP Bulk_Upgrader_Skin::add_strings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bulk_Upgrader_Skin
的用法示例。
在下文中一共展示了Bulk_Upgrader_Skin::add_strings方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: add_strings
public function add_strings() {
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
}
示例2: add_strings
/**
* Sets install skin strings for each individual plugin.
*
* Checks to see if the automatic activation flag is set and uses the
* the proper strings accordingly.
*
* @since 2.2.0
*/
public function add_strings()
{
if ('update' === $this->options['install_type']) {
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)', 'tgmpa');
} else {
$this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while installing %1$s: <strong>%2$s</strong>.', 'tgmpa');
$this->upgrader->strings['skin_update_failed'] = __('The installation of %1$s failed.', 'tgmpa');
if ($this->tgmpa->is_automatic) {
// Automatic activation strings.
$this->upgrader->strings['skin_upgrade_start'] = __('The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa');
$this->upgrader->strings['skin_update_successful'] = __('%1$s installed and activated successfully.', 'tgmpa') . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__('Show Details', 'tgmpa') . '</span><span class="hidden">' . esc_html__('Hide Details', 'tgmpa') . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __('All installations and activations have been completed.', 'tgmpa');
$this->upgrader->strings['skin_before_update_header'] = __('Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa');
} else {
// Default installation strings.
$this->upgrader->strings['skin_upgrade_start'] = __('The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa');
$this->upgrader->strings['skin_update_successful'] = esc_html__('%1$s installed successfully.', 'tgmpa') . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__('Show Details', 'tgmpa') . '</span><span class="hidden">' . esc_html__('Hide Details', 'tgmpa') . '</span>.</a>';
$this->upgrader->strings['skin_upgrade_end'] = __('All installations have been completed.', 'tgmpa');
$this->upgrader->strings['skin_before_update_header'] = __('Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa');
}
}
}
示例3:
function add_strings()
{
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Extension %1$s (%2$d/%3$d)', 'framework');
}