'' . __('Get Support', 'bdthemes-element-pack') . '',
'video' => '' . __('Video Tutorials', 'bdthemes-element-pack') . '',
];
$plugin_meta = array_merge($plugin_meta, $row_meta);
}
return $plugin_meta;
}
public function plugin_action_links( $plugin_meta ) {
$row_meta = [
'settings' => '' . __('Settings', 'bdthemes-element-pack') . '',
'gopro' => '' . __('Go Pro', 'bdthemes-element-pack') . '',
];
$plugin_meta = array_merge($plugin_meta, $row_meta);
return $plugin_meta;
}
/**
* Action meta
* @access public
* @return array
*/
public function plugin_action_meta($links) {
$links = array_merge([sprintf('%s', element_pack_dashboard_link('#element_pack_welcome'), esc_html__('Settings', 'bdthemes-element-pack'))], $links);
return $links;
}
/**
* Register admin script
* @access public
*/
public function admin_script() {
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
if ( is_admin() ) { // for Admin Dashboard Only
wp_enqueue_script('chart', BDTEP_ASSETS_URL . 'vendor/js/chart.min.js', ['jquery'], '2.7.3', true);
wp_enqueue_script('ep-admin', BDTEP_ADMIN_URL . 'assets/js/ep-admin' . $suffix . '.js', ['jquery'], BDTEP_VER, true);
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-form');
}
}
/**
* Drop Tables on deactivated plugin
* @access public
*/
public function bdthemes_element_pack_plugin_on_deactivate() {
global $wpdb;
$table_cat = $wpdb->prefix . 'ep_template_library_cat';
$table_post = $wpdb->prefix . 'ep_template_library_post';
$table_cat_post = $wpdb->prefix . 'ep_template_library_cat_post';
@$wpdb->query('DROP TABLE IF EXISTS ' . $table_cat_post);
@$wpdb->query('DROP TABLE IF EXISTS ' . $table_cat);
@$wpdb->query('DROP TABLE IF EXISTS ' . $table_post);
}
/**
* Upgrade Process Complete
* @access public
*/
public function bdthemes_element_pack_plugin_on_upgrade_process_complete($upgrader_object, $options) {
if (isset($options['action']) && $options['action'] == 'update' && $options['type'] == 'plugin') {
if (isset($options['plugins']) && is_array($options['plugins'])) {
foreach ($options['plugins'] as $each_plugin) {
if ($each_plugin == BDTEP_PBNAME) {
@$this->bdthemes_element_pack_plugin_on_deactivate();
}
}
}
}
}
}