Exemplo n.º 1
0
?>
</a>
		<?php 
esc_html_e('BackUpWordPress Extensions', 'backupwordpress');
?>
	</h1>

	<div class="wp-filter">
		<p><?php 
esc_html_e('Extend BackUpWordPress by installing extensions. Extensions allow you to pick and choose the exact features you need whilst also supporting us, the developers, so we can continue working on BackUpWordPress.', 'backupwordpress');
?>
</p>
	</div>

	<?php 
$extensions_data = Extensions::get_instance()->get_edd_data();
// Sort by title.
usort($extensions_data, function ($a, $b) {
    return strcmp($b->title->rendered, $a->title->rendered);
});
/**
 * Include is required for the usage of is_plugin_active()
 * to identify if a plugin is currently activated.
 * This info is further used to display a correct action button
 * depending on plugin's state (i.e. Update Now, Activate, Active).
 */
include_once ABSPATH . 'wp-admin/includes/plugin.php';
$installed_plugins = array();
foreach (get_plugins() as $path => $plugin_info) {
    $installed_plugins[strtolower($plugin_info['Name'])] = array('version' => $plugin_info['Version'], 'path' => $path, 'is_active' => is_plugin_active($path));
}
Exemplo n.º 2
0
 public function test_instance()
 {
     $instance = Extensions::get_instance();
     $this->assertInstanceOf('HM\\BackUpWordPress\\Extensions', $instance);
 }