芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/wp-content/plugins/admin-columns-pro/cac-addon-pro.php
plugin_basename = plugin_basename( __FILE__ ); $this->define_constants(); // Load modules $this->init(); // 3rd party integrations $this->third_party(); // Hooks add_action( 'init', array( $this, 'localize' ) ); add_action( 'cac/loaded', array( $this, 'init_after_cac_loaded' ) ); add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 1, 2 ); add_action( 'wp_loaded', array( $this, 'after_setup' ) ); add_action( 'network_admin_menu', array( $this, 'network_settings_menu' ) ); } /** * Define constants * * @since 3.1.2 */ public function define_constants() { define( 'CAC_PRO_VERSION', ACP_VERSION ); define( 'CAC_PRO_URL', plugin_dir_url( __FILE__ ) ); define( 'CAC_PRO_DIR', plugin_dir_path( __FILE__ ) ); } /** * Handle localization * * @since 1.0.1 * @uses load_plugin_textdomain() */ public function localize() { load_plugin_textdomain( 'codepress-admin-columns', false, dirname( $this->plugin_basename ) . '/languages/' ); } /** * Fire callbacks for admin columns setup completion * * @since 2.2 */ public function after_setup() { /** * Fires when Admin Columns is fully loaded * Use this for setting up addon functionality * * @since 2.0 * @param CPAC $cpac_instance Main Admin Columns plugin class instance */ do_action( 'cac/pro/loaded', $this ); } /** * General plugin initialization, loading plugin module files * * @since 1.0 */ public function init() { if ( ! class_exists( 'CAC_Export_Import', false ) ) { include_once 'classes/export-import/export-import.php'; } if ( ! class_exists( 'CAC_Addon_Filtering', false ) ) { include_once 'classes/filtering/filtering.php'; } if ( ! class_exists( 'CAC_Addon_Sortable', false ) ) { include_once 'classes/sortable/sortable.php'; } if ( ! class_exists( 'CAC_Storage_Model_Taxonomy', false ) ) { include_once 'classes/taxonomy/taxonomy.php'; } if ( ! class_exists( 'CPAC_Storage_Model_MS_User', false ) ) { include_once 'classes/ms-user/ms-user.php'; } if ( ! class_exists( 'CACIE_Addon_InlineEdit', false ) ) { include_once 'classes/inline-edit/cac-addon-inline-edit.php'; } if ( ! class_exists( 'CACIE_Addon_Columns', false ) ) { include_once 'classes/columns/cac-addon-columns.php'; } } /** * Load third party add-ons * * @since 3.4.1 */ public function third_party() { include_once 'classes/third-party/bbpress.php'; include_once 'classes/third-party/wordpress-seo.php'; } /** * Init callback after main plugin (CPAC) has been fully loaded. * * @since 1.0 */ public function init_after_cac_loaded( $cpac ) { if ( ! class_exists('Codepress_Licence_Manager_Settings') ) { include_once 'classes/licence-manager-settings.php'; // When used into Admin Columns Pro use it's root path... $this->licence_manager = new Codepress_Licence_Manager_Settings( ACP_FILE, $cpac, $this ); if ( defined( 'ACP_LICENCE' ) ) { $this->licence_manager->set_licence_key( ACP_LICENCE ); } } } /** * @since 1.0 * @see filter:plugin_action_links */ public function add_settings_link( $links, $file ) { if ( ( ! $this->is_cpac_enabled() ) || ( $file != plugin_basename( __FILE__ ) ) ) { return $links; } array_unshift( $links, '
' . __( 'Settings' ) . '
' ); return $links; } /** * Check if main plugin is enabled * * @since 1.0.3 */ public function is_cpac_enabled() { return class_exists( 'CPAC', false ); } /** * Get licence manager * * @since 3.1.1 */ public function get_licence_manager() { return $this->licence_manager; } /** * @since 3.6 */ public function get_network_settings_page() { return $this->network_settings_page; } /** * Add network settings page * * @since 3.6 */ public function network_settings_menu() { $this->network_settings_page = add_submenu_page( 'settings.php', __( 'Admin Columns Settings', 'codepress-admin-columns' ), __( 'Admin Columns', 'codepress-admin-columns' ), 'manage_admin_columns', 'codepress-admin-columns', array( $this, 'network_display' ), false, 98 ); } /** * Displays network settings page * * @since 3.6 */ public function network_display() { if ( $groups = apply_filters( 'cac/network_settings/groups', array() ) ) : ?>
Admin Columns
$group ) : $defaults = array( 'title' => '', 'description' => '', ); $group = (object) array_merge( $defaults, $group ); ?>
title; ?>
description; ?>