Plugin Directory

Changeset 2580999


Ignore:
Timestamp:
08/10/2021 05:01:43 PM (5 years ago)
Author:
cloudengage
Message:

adding admin menu

Location:
chord-connect/trunk
Files:
9 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • chord-connect/trunk/includes/class-chordconnect-base.php

    r2574155 r2580999  
    9191    }
    9292
     93    public function get_notice( $type, $class = array() ) {
     94
     95        return $this->get_template( 'cloudengage-notice.php', array(
     96            'type' => $type,
     97            'class' => $class
     98        ) );
     99
     100    }
     101
    93102}
  • chord-connect/trunk/includes/class-chordconnect.php

    r2574155 r2580999  
    110110        $this->load_dependencies();
    111111        $this->define_public_hooks();
     112        $this->define_admin_hooks();
    112113    }
    113114
     
    148149
    149150        /**
     151         * The class responsible for defining all actions that occur in the admin area.
     152         */
     153        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-chordconnect-admin.php';
     154
     155        /**
    150156         * The class responsible for defining all actions that occur in the public-facing
    151157         * side of the site.
     
    157163
    158164    /**
     165     * Register all of the hooks related to the admin area functionality
     166     * of the plugin.
     167     *
     168     * @since    1.0.0
     169     * @access   private
     170     */
     171    private function define_admin_hooks() {
     172
     173        $plugin_admin = new Chordconnect_Admin( $this->get_plugin_name(), 'admin', $this->get_version() );
     174
     175        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
     176
     177        // add our settings page to the General Settings menu
     178        $this->loader->add_action( 'admin_menu', $plugin_admin, 'initialize_menu' );
     179
     180        $this->loader->add_action( 'admin_post_chordconnect_handle_form_post', $plugin_admin, 'handle_form_post' );
     181
     182        $this->loader->add_action( 'admin_post_chordconnect_handle_get_update', $plugin_admin, 'handle_get_update' );
     183
     184        $this->loader->add_action( 'load-settings_page_chordconnect', $plugin_admin, 'settings_page_on_load' );
     185
     186        $this->loader->add_action( 'admin_notices', $plugin_admin, 'admin_notices' );
     187
     188        // adds a settings link to the plugin page
     189        $this->loader->add_filter( 'plugin_action_links_chordconnect/chordconnect.php', $plugin_admin, 'plugin_add_settings_link' );
     190
     191    }
     192
     193    /**
    159194     * Register all of the hooks related to the public-facing functionality
    160195     * of the plugin.
Note: See TracChangeset for help on using the changeset viewer.