本文整理汇总了PHP中DUP_Util::__方法的典型用法代码示例。如果您正苦于以下问题:PHP DUP_Util::__方法的具体用法?PHP DUP_Util::__怎么用?PHP DUP_Util::__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DUP_Util
的用法示例。
在下文中一共展示了DUP_Util::__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strlen
<td><?php
DUP_Util::_e("User");
?>
:</td>
<td><?php
echo strlen($package->Installer->OptsDBUser) ? $package->Installer->OptsDBUser : DUP_Util::__("- not set -");
?>
</td>
</tr>
<tr>
<td><?php
DUP_Util::_e("New URL");
?>
:</td>
<td><?php
echo strlen($package->Installer->OptsURLNew) ? $package->Installer->OptsURLNew : DUP_Util::__("- not set -");
?>
</td>
</tr>
</table>
</div>
</div>
<?php
if ($debug_on) {
?>
<div style="margin:0">
<a href="javascript:void(0)" onclick="jQuery(this).parent().find('.dup-pack-debug').toggle()">[<?php
DUP_Util::_e("View Package Object");
?>
]</a><br/>
示例2: wp_create_nonce
require_once DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php';
require_once DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php';
$nonce = wp_create_nonce('duplicator_cleanup_page');
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
if (isset($_GET['action'])) {
if ($_GET['action'] == 'installer' || $_GET['action'] == 'legacy' || $_GET['action'] == 'tmp-cache') {
$verify_nonce = $_REQUEST['_wpnonce'];
if (!wp_verify_nonce($verify_nonce, 'duplicator_cleanup_page')) {
exit;
// Get out of here bad nounce!
}
}
}
$txt_found = DUP_Util::__("File Found");
$txt_not_found = DUP_Util::__("File Removed");
$installer_files = DUP_Server::GetInstallerFiles();
switch ($_GET['action']) {
case 'installer':
$action_response = __('Installer file cleanup ran!');
$css_hide_msg = 'div.error {display:none}';
break;
case 'legacy':
DUP_Settings::LegacyClean();
$action_response = __('Legacy data removed.');
break;
case 'tmp-cache':
DUP_Package::TmpCleanup(true);
$action_response = __('Build cache removed.');
break;
}
示例3: duplicator_menu
/**
* DUPLICATOR_MENU
* Loads the menu item into the WP tools section and queues the actions for only this plugin */
function duplicator_menu()
{
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
//Main Menu
$perms = 'export';
$perms = apply_filters($wpfront_caps_translator, $perms);
$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', $icon_svg);
//$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/logo-menu.svg'));
$perms = 'export';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_packages = add_submenu_page('duplicator', DUP_Util::__('Packages'), DUP_Util::__('Packages'), $perms, 'duplicator', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_settings = add_submenu_page('duplicator', DUP_Util::__('Settings'), DUP_Util::__('Settings'), $perms, 'duplicator-settings', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_tools = add_submenu_page('duplicator', DUP_Util::__('Tools'), DUP_Util::__('Tools'), $perms, 'duplicator-tools', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_help = add_submenu_page('duplicator', DUP_Util::__('Help'), DUP_Util::__('Help'), $perms, 'duplicator-help', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_about = add_submenu_page('duplicator', DUP_Util::__('About'), DUP_Util::__('About'), $perms, 'duplicator-about', 'duplicator_get_menu');
$perms = 'manage_options';
$go_pro_link = '<span style="color:#f18500">' . DUP_Util::__('Go Pro!') . '</span>';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
//Apply Scripts
add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_help, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_about, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
//Apply Styles
add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
add_action('admin_print_styles-' . $page_help, 'duplicator_styles');
add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
add_action('admin_print_styles-' . $page_about, 'duplicator_styles');
add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
}
示例4: printf
<div class='dup-scan-info dup-info-box'>
<b><?php
DUP_Util::_e('Tables');
?>
:</b> <span id="data-db-tablecount"></span> |
<b><?php
DUP_Util::_e('Records');
?>
:</b> <span id="data-db-rows"></span> |
<b><?php
DUP_Util::_e('Size');
?>
:</b> <span id="data-db-size2"></span> <br/><br/>
<?php
$lnk = '<a href="maint/repair.php" target="_blank">' . DUP_Util::__('repair and optimization') . '</a>';
printf(DUP_Util::__('Total size and row count for all database tables are approximate values. The thresholds that trigger warnings are %1$s and %2$s records. Large databases take time to process and can cause issues with server timeout and memory settings. Running a %3$s on your database can also help improve the overall size and performance. If your server supports shell_exec and mysqldump you can try to enable this option from the settings menu.'), DUP_Util::ByteSize(DUPLICATOR_SCAN_DBSIZE), number_format(DUPLICATOR_SCAN_DBROWS), $lnk);
?>
</div>
</div>
<!-- ============
TABLE DETAILS -->
<div>
<div class='dup-scan-title'>
<a><?php
DUP_Util::_e('Table Details');
?>
</a>
<div id="data-db-status-size2"></div>
</div>
<div class='dup-scan-info dup-info-box'>
示例5: _e
?>
</textarea>
<div class="dup-tabs-opts-help">
<?php
_e("The directory paths and extensions above will be be excluded from the archive file if enabled is checked.", 'wpduplicator');
?>
<br/>
<?php
_e("Use the full path for directories and semicolons to separate all items.", 'wpduplicator');
?>
</div>
<br/>
<span style="font-style:italic; font-size:12px ">
<?php
echo sprintf(DUP_Util::__('%1$s are available in'), 'Individual file filters');
?>
<a href="http://snapcreek.com/duplicator/?free-file-filters" target="_blank">Duplicator Pro</a>
</span>
</div>
</div>
<!-- TAB2: DATABASE -->
<div class="tabs-panel" id="dup-pack-opts-tabs-panel-2" style="display: none;">
<div class="dup-enable-filters">
<table>
<tr>
<td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php
echo $Package->Database->FilterOn ? "checked='checked'" : "";
?>
/></td>
示例6: duplicator_menu
/**
* DUPLICATOR_MENU
* Loads the menu item into the WP tools section and queues the actions for only this plugin */
function duplicator_menu()
{
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
//Main Menu
$perms = 'export';
$perms = apply_filters($wpfront_caps_translator, $perms);
$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/create.png'));
$perms = 'export';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_packages = add_submenu_page('duplicator', DUP_Util::__('Packages'), DUP_Util::__('Packages'), $perms, 'duplicator', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_settings = add_submenu_page('duplicator', DUP_Util::__('Settings'), DUP_Util::__('Settings'), $perms, 'duplicator-settings', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_tools = add_submenu_page('duplicator', DUP_Util::__('Tools'), DUP_Util::__('Tools'), $perms, 'duplicator-tools', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_help = add_submenu_page('duplicator', DUP_Util::__('Help'), DUP_Util::__('Help'), $perms, 'duplicator-help', 'duplicator_get_menu');
$perms = 'manage_options';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_about = add_submenu_page('duplicator', DUP_Util::__('About'), DUP_Util::__('About'), $perms, 'duplicator-about', 'duplicator_get_menu');
$perms = 'manage_options';
$go_pro_link = '<span style="color:#f18500">' . DUP_Util::__('Go Pro!') . '</span>';
$perms = apply_filters($wpfront_caps_translator, $perms);
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
//Apply Scripts
add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_help, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_about, 'duplicator_scripts');
add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
//Apply Styles
add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
add_action('admin_print_styles-' . $page_help, 'duplicator_styles');
add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
add_action('admin_print_styles-' . $page_about, 'duplicator_styles');
add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
}
示例7: wp_create_nonce
require_once DUPLICATOR_PLUGIN_PATH . '/views/javascript.php';
require_once DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php';
$nonce = wp_create_nonce('duplicator_cleanup_page');
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
if (isset($_GET['action'])) {
if ($_GET['action'] == 'installer' || $_GET['action'] == 'legacy' || $_GET['action'] == 'tmp-cache') {
$verify_nonce = $_REQUEST['_wpnonce'];
if (!wp_verify_nonce($verify_nonce, 'duplicator_cleanup_page')) {
exit;
// Get out of here bad nounce!
}
}
}
$found = DUP_Util::__("Found");
$not_found = DUP_Util::__("Not Found");
$installer_file = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_PHP;
$installer_bak = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_BAK;
$installer_sql1 = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_SQL;
$installer_sql2 = DUPLICATOR_WPROOTPATH . 'database.sql';
$installer_log = DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_LOG;
switch ($_GET['action']) {
case 'installer':
$action_response = __('Installer file cleanup ran!');
$css_hide_msg = 'div.dup-header div.error {display:none}';
@unlink($installer_file);
@unlink($installer_bak);
@unlink($installer_sql1);
@unlink($installer_sql2);
@unlink($installer_log);
break;
示例8: ShowReservedFilesNotice
/**
* Shows a display message in the wp-admin if any researved files are found
* @return type void
*/
public static function ShowReservedFilesNotice()
{
//Show only on Duplicator pages and Dashboard when plugin is active
$dup_active = is_plugin_active('duplicator/duplicator.php');
$dup_perm = current_user_can('manage_options');
if (!$dup_active || !$dup_perm) {
return;
}
if (DUP_Server::InstallerFilesFound()) {
$screen = get_current_screen();
$on_active_tab = isset($_GET['tab']) && $_GET['tab'] == 'cleanup' ? true : false;
echo '<div class="error" id="dup-global-error-reserved-files"><p>';
if ($screen->id == 'duplicator_page_duplicator-tools' && $on_active_tab) {
DUP_Util::_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.');
} else {
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
DUP_Util::_e('Reserved Duplicator install files have been detected in the root directory. Please delete these reserved files to avoid security issues.');
@printf("<br/><a href='admin.php?page=duplicator-tools&tab=cleanup&_wpnonce=%s'>%s</a>", $duplicator_nonce, DUP_Util::__('Take me to the cleanup page!'));
}
echo "</p></div>";
}
}
示例9: duplicator_header
<div class="wrap">
<?php
duplicator_header(DUP_Util::__("Package Details » {$package->Name}"));
?>
<?php
if ($err_found) {
?>
<div class="error">
<p>
<?php
echo DUP_Util::__('An error was detected while creating this package. Please review the ') . $err_link_log . DUP_Util::__(' for more details.');
?>
<br/>
<?php
echo DUP_Util::__('Additional help is available online via the ') . $err_link_faq . DUP_Util::__(' or just contact support via a ') . $err_link_ticket;
?>
</p>
</div>
<?php
}
?>
<h2 class="nav-tab-wrapper">
<a href="?page=duplicator&action=detail&tab=detail&id=<?php
echo $package_id;
?>
" class="nav-tab <?php
echo $current_tab == 'detail' ? 'nav-tab-active' : '';
?>
示例10: duplicator_header
<div class="wrap">
<?php
duplicator_header(DUP_Util::__("Package Details » {$package->Name}"));
?>
<?php
if ($err_found) {
?>
<div class="error">
<p>
<?php
echo DUP_Util::__('This package contains an error. Please review the ') . $err_link_log . DUP_Util::__(' for details.');
?>
<?php
echo DUP_Util::__('For help visit the ') . $err_link_faq . DUP_Util::__(' and ') . $err_link_ticket;
?>
</p>
</div>
<?php
}
?>
<h2 class="nav-tab-wrapper">
<a href="?page=duplicator&action=detail&tab=detail&id=<?php
echo $package_id;
?>
" class="nav-tab <?php
echo $current_tab == 'detail' ? 'nav-tab-active' : '';
?>
示例11:
<div class="transfer-panel">
<div class="transfer-hdr">
<h2><i class="fa fa-arrow-circle-right"></i> <?php
DUP_Util::_e('Manual Transfer');
?>
</h2>
</div>
<br/>
<div style="font-size:16px; text-align: center; line-height: 30px">
<img src="<?php
echo DUPLICATOR_PLUGIN_URL;
?>
assets/img/logo-dpro-300x50.png" />
<?php
echo '<h2>' . DUP_Util::__('This option is available only in Duplicator Professional.') . '</h2>';
DUP_Util::_e('Manual transfer lets you copy a package to Amazon S3, Dropbox, Google Drive, FTP or another directory.');
echo '<br/>';
DUP_Util::_e('Simply choose your destination and hit the transfer button and your done.');
?>
</div>
<p style="text-align:center">
<a href="http://snapcreek.com/duplicator?free-manual-transfer" target="_blank" class="button button-primary button-large dup-check-it-btn" >
<?php
DUP_Util::_e('Learn More');
?>
</a>
</p>
</div>