芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/wp-content/plugins/bdthemes-element-pack/admin/admin.php
'
' . __('Get Support', 'bdthemes-element-pack') . '
', 'video' => '
' . __('Video Tutorials', '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); $links = array_merge($links, [ sprintf( '
%s
', element_pack_dashboard_link('#license'), esc_html__('License', 'bdthemes-element-pack') ) ]); return $links; } /** * Change Element Pack Name * @access public * @return string */ public function element_pack_name_change($translated_text, $text, $domain) { switch ($translated_text) { case 'Element Pack Pro': $translated_text = BDTEP_TITLE; break; } return $translated_text; } /** * Hiding plugins //still in testing purpose * @access public */ public function hide_element_pack() { global $wp_list_table; $hide_plg_array = array('bdthemes-element-pack/bdthemes-element-pack.php'); $all_plugins = $wp_list_table->items; foreach ($all_plugins as $key => $val) { if (in_array($key, $hide_plg_array)) { unset($wp_list_table->items[$key]); } } } /** * 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('jquery'); wp_enqueue_script('jquery-form'); if (isset($_GET['page']) && ($_GET['page'] == 'element_pack_options')) { wp_enqueue_script('chart', BDTEP_ASSETS_URL . 'vendor/js/chart.min.js', ['jquery'], '3.9.1', true); wp_enqueue_script('ep-admin', BDTEP_ADMIN_URL . 'assets/js/ep-admin' . $suffix . '.js', ['jquery', 'chart'], BDTEP_VER, true); } else { wp_enqueue_script('ep-admin', BDTEP_ADMIN_URL . 'assets/js/ep-admin' . $suffix . '.js', ['jquery'], BDTEP_VER, true); } } } /** * 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'; /** * Check if the tables exist before attempting to drop them */ if ($wpdb->get_var("SHOW TABLES LIKE '$table_cat'") == $table_cat) { $wpdb->query("DROP TABLE $table_cat"); } if ($wpdb->get_var("SHOW TABLES LIKE '$table_post'") == $table_post) { $wpdb->query("DROP TABLE $table_post"); } if ($wpdb->get_var("SHOW TABLES LIKE '$table_cat_post'") == $table_cat_post) { $wpdb->query("DROP TABLE $table_cat_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(); } } } } } }