Commit 51583b38 authored by John James Jacoby's avatar John James Jacoby

Updates to updaters.

parent 8c7867bb
......@@ -15,16 +15,16 @@
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
if ( class_exists( 'Flox_Theme_Updater' ) ) :
/**
* Theme updater admin page and functions
*/
class Swifter_Theme_Updater_Admin extends Flox_Theme_Updater {
final class Swifter_Theme_Updater_Admin extends Flox_Theme_Updater {
/**
* Initialize the class
*/
public function __construct( $args = array() ) {
parent::__construct( $args );
// Setup interface elements
......@@ -50,7 +50,9 @@ class Swifter_Theme_Updater_Admin extends Flox_Theme_Updater {
* @since Swifter (1.0.0)
*/
public function license_page() {
?>
// Get the license
$license = $this->license(); ?>
<div class="wrap">
<h2><?php esc_html_e( 'Swifter Licenses', 'swifter' ); ?></h2>
......@@ -59,9 +61,9 @@ class Swifter_Theme_Updater_Admin extends Flox_Theme_Updater {
<?php
settings_fields( $this->license() );
settings_fields( $license );
do_settings_sections( $this->license() );
do_settings_sections( $license );
submit_button();
......@@ -73,3 +75,4 @@ class Swifter_Theme_Updater_Admin extends Flox_Theme_Updater {
<?php
}
}
endif;
This diff is collapsed.
......@@ -47,10 +47,8 @@ class Flox_Plugin_Updater extends Flox_Licensed_Product {
// Populate variables
$this->license = $this->get_license();
$this->plugin_file = $args['plugin_file'];
$this->basename = plugin_basename( $this->plugin_file );
// Override slug
//$this->slug = basename( $this->plugin_file, '.php' );
$this->basename = plugin_basename( $this->plugin_file );
//$this->slug = str_replace( '-', '_', basename( $this->plugin_file, '.php' ) );
// Set up hooks.
$this->init();
......@@ -62,9 +60,9 @@ class Flox_Plugin_Updater extends Flox_Licensed_Product {
private function init() {
// Actions
add_action( 'load-update-core.php', array( $this, 'delete_update_transient' ) );
add_action( 'load-plugins.php', array( $this, 'delete_update_transient' ) );
add_action( 'load-plugins.php', array( $this, 'load_plugins_screen' ) );
add_action( 'load-update-core.php', array( $this, 'delete_update_transient' ) );
add_action( 'load-plugins.php', array( $this, 'delete_update_transient' ) );
add_action( 'load-plugins.php', array( $this, 'load_plugins_screen' ) );
add_action( 'after_plugin_row_' . $this->basename, array( $this, 'show_update_notification' ) );
add_action( 'admin_init', array( $this, 'show_changelog' ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment