/**
 * Hook in an change the plugin description when BackUpWordPress is activated
 *
 * @param array $plugins
 * @return array $plugins
 */
function plugin_row($plugins)
{
    $menu = is_multisite() ? 'Settings' : 'Tools';
    if (isset($plugins[HMBKP_PLUGIN_SLUG . '/backupwordpress.php'])) {
        $plugins[HMBKP_PLUGIN_SLUG . '/backupwordpress.php']['Description'] = str_replace('Once activated you\'ll find me under <strong>' . $menu . ' &rarr; Backups</strong>', 'Find me under <strong><a href="' . esc_url(get_settings_url()) . '">' . $menu . ' &rarr; Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/backupwordpress.php']['Description']);
    }
    return $plugins;
}
        _e('Excludes', 'backupwordpress');
        ?>
</a> |
		<?php 
    }
    ?>

		<?php 
    foreach (Services::get_services($schedule) as $service) {
        if (!$service->has_form()) {
            continue;
        }
        ?>

			<a href="<?php 
        echo esc_url(add_query_arg(array('action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_settings_' . $service->get_slug(), 'hmbkp_schedule_id' => $schedule->get_id()), get_settings_url()));
        ?>
"><?php 
        echo esc_html($service->name);
        ?>
</a> |

		<?php 
    }
    ?>

		<a class="delete-action" href="<?php 
    echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'hmbkp_request_delete_schedule', 'hmbkp_schedule_id' => $schedule->get_id()), admin_url('admin-post.php')), 'hmbkp_delete_schedule', 'hmbkp_delete_schedule_nonce'));
    ?>
"><?php 
    _e('Delete', 'backupwordpress');
Exemple #3
0
/**
 *
 * @param null
 */
function recalculate_directory_filesize()
{
    if (!isset($_GET['hmbkp_recalculate_directory_filesize']) || !check_admin_referer('hmbkp-recalculate_directory_filesize')) {
        return;
    }
    // Delete the cached directory size
    @unlink(trailingslashit(Path::get_path()) . '.files');
    $url = add_query_arg(array('action' => 'hmbkp_edit_schedule', 'hmbkp_panel' => 'hmbkp_edit_schedule_excludes'), get_settings_url());
    if (isset($_GET['hmbkp_directory_browse'])) {
        $url = add_query_arg('hmbkp_directory_browse', sanitize_text_field($_GET['hmbkp_directory_browse']), $url);
    }
    wp_safe_redirect($url, '303');
    die;
}
Exemple #4
0
    public function display_feature_message()
    {
        $current_screen = get_current_screen();
        if (!isset($current_screen)) {
            return;
        }
        $page = is_multisite() ? HMBKP_ADMIN_PAGE . '-network' : HMBKP_ADMIN_PAGE;
        if ($current_screen->id !== $page) {
            return;
        }
        /* translators: %1$s and %2$s expand to anchor tags linking to the new extensions page. */
        $info_message = sprintf(__('Thanks for updating BackUpWordPress, why not check out %1$sour extensions?%2$s', 'backupwordpress'), '<a href="' . esc_url(get_settings_url(HMBKP_PLUGIN_SLUG . '_extensions')) . '">', '</a>');
        ?>

		<div id="hmbkp-info-message" class="updated notice is-dismissible">

			<p><?php 
        echo wp_kses_post($info_message);
        ?>
</p>

			<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php 
        esc_html_e('Dismiss this notice.', 'backupwordpress');
        ?>
</span></button>

		</div>

	<?php 
    }
    ?>

			<tr>
				<td colspan="5"><span class="description"><?php 
    _e('This folder is empty', 'backupwordpress');
    ?>
</span></td>
			</tr>

		<?php 
}
?>

		</tbody>

	</table>


	<p class="submit">
		<a href="<?php 
echo esc_url(get_settings_url());
?>
"
		   class="button-primary"><?php 
_e('Done', 'backupwordpress');
?>
</a>
	</p>

</div>
<?php 
Exemple #6
0
<?php

namespace HM\BackUpWordPress;

?>

<div class="wrap">

	<h1>

		BackUpWordPress

		<a class="page-title-action" href="<?php 
echo esc_url(get_settings_url(HMBKP_PLUGIN_SLUG . '_extensions'));
?>
">Extensions</a>

		<?php 
if (get_option('hmbkp_enable_support')) {
    ?>

			<a id="intercom" class="page-title-action" href="mailto:backupwordpress@hmn.md"><?php 
    _e('Support', 'backupwordpress');
    ?>
</a>

		<?php 
} else {
    add_thickbox();
    ?>
			<a id="intercom-info" class="thickbox page-title-action" href="<?php 
<?php

namespace HM\BackUpWordPress;

?>
<div class="hmbkp-upsell">

<p>

<?php 
/** translators:  the 1st placeholder is the first part of the anchor tag with the link to the extensions admin page and the second is the closing anchor tag */
printf(__('Store your backups securely in the Cloud with %1$sour extensions%2$s', 'backupwordpress'), '<a href="' . esc_url(get_settings_url(HMBKP_PLUGIN_SLUG . '_extensions')) . '">', '</a>');
?>

</p>

</div>
<?php