本文整理汇总了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');
}