diff --git a/admin/class-copy-link-for-buddyboss-admin.php b/admin/class-copy-link-for-buddyboss-admin.php index 861c12d..2fecfd3 100644 --- a/admin/class-copy-link-for-buddyboss-admin.php +++ b/admin/class-copy-link-for-buddyboss-admin.php @@ -71,56 +71,8 @@ public function __construct( $plugin_name, $version ) { $this->plugin_name = $plugin_name; $this->version = $version; - - $this->js_asset_file = include( COPY_LINK_FOR_BUDDYBOSS_PLUGIN_PATH . 'build/js/backend.asset.php' ); - $this->css_asset_file = include( COPY_LINK_FOR_BUDDYBOSS_PLUGIN_PATH . 'build/css/backend.asset.php' ); - } - - /** - * Register the stylesheets for the admin area. - * - * @since 1.0.0 - */ - public function enqueue_styles() { - - /** - * This function is provided for demonstration purposes only. - * - * An instance of this class should be passed to the run() function - * defined in Copy_Link_For_BuddyBoss_Loader as all of the hooks are defined - * in that particular class. - * - * The Copy_Link_For_BuddyBoss_Loader will then create the relationship - * between the defined hooks and the functions defined in this - * class. - */ - - wp_enqueue_style( $this->plugin_name, COPY_LINK_FOR_BUDDYBOSS_PLUGIN_URL . 'build/css/backend.css', $this->css_asset_file['dependencies'], $this->css_asset_file['version'], 'all' ); - } - /** - * Register the JavaScript for the admin area. - * - * @since 1.0.0 - */ - public function enqueue_scripts() { - - /** - * This function is provided for demonstration purposes only. - * - * An instance of this class should be passed to the run() function - * defined in Copy_Link_For_BuddyBoss_Loader as all of the hooks are defined - * in that particular class. - * - * The Copy_Link_For_BuddyBoss_Loader will then create the relationship - * between the defined hooks and the functions defined in this - * class. - */ - - wp_enqueue_script( $this->plugin_name, COPY_LINK_FOR_BUDDYBOSS_PLUGIN_URL . 'build/js/backend.js', $this->js_asset_file['dependencies'], $this->js_asset_file['version'], false ); - - } /** * Add setting for Copy Comment diff --git a/includes/class-copy-link-for-buddyboss.php b/includes/class-copy-link-for-buddyboss.php index 25c2b3c..a34cd70 100644 --- a/includes/class-copy-link-for-buddyboss.php +++ b/includes/class-copy-link-for-buddyboss.php @@ -321,10 +321,6 @@ private function set_locale() { private function define_admin_hooks() { $plugin_admin = new Copy_Link_For_BuddyBoss_Admin( $this->get_plugin_name(), $this->get_version() ); - - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); - - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); $this->loader->add_action( 'bp_admin_setting_activity_register_fields', $plugin_admin, 'register_fields', 2 ); @@ -422,6 +418,10 @@ public function access_control_settings( $key_id ) { */ function is_access_control( $key_id, $create = true ) { + if ( ! class_exists( 'BB_Access_Control' ) ) { + return $create; + } + $create_activity_settings = $this->access_control_settings( $key_id ); $has_access = false; if ( empty( $create_activity_settings ) || ( isset( $create_activity_settings['access-control-type'] ) && empty( $create_activity_settings['access-control-type'] ) ) ) {