1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41:
<?php
namespace VSP\Modules\Addons;
defined( 'ABSPATH' ) || exit;
abstract class Admin extends Core {
public function link_with_wponion( $pages ) {
$pages->container( $this->option( 'addon_listing_tab_name' ), $this->option( 'addon_listing_tab_title' ), $this->option( 'addon_listing_tab_icon' ) )
->callback( array( &$this, 'render_page' ) );
}
public function render_page() {
$this->addons = false;
$this->in_display = true;
$this->addon_cats = self::$default_addon_cats;
$this->addon_counts = array_combine( array_keys( $this->addon_cats ), array_fill( 0, count( $this->addon_cats ), 0 ) );
$this->search_addons();
$this->addon_counts['all'] = ( is_array( $this->addons ) ) ? count( $this->addons ) : 0;
$this->addon_counts['active'] = ( is_array( $this->active_addons ) ) ? count( $this->active_addons ) : 0;
$this->addon_counts['inactive'] = ( is_array( $this->addons ) && is_array( $this->active_addons ) ) ? count( $this->addons ) - count( $this->active_addons ) : 0;
vsp_load_core_assets();
include VSP_PATH . 'views/addon-page.php';
}
}