Forums

nggLoader start_plugin method (7 posts)

  1. wrk
    Member
    Posted 2 years ago #

    Hello,

    Im doing some research in the next gen gallery plugin and don't understand the following in the nggLoader class:

    In the 'constructor' the method 'start_plugin()' is called with:

    // Start this plugin once all other plugins are fully loaded
    add_action( 'plugins_loaded', array(&$this, 'start_plugin') );

    Then in the start_plugin method, it says to or load the admin panel or the frontend functions.

    // Load the admin panel or the frontend functions
    if ( is_admin() ) {	
    
      // Pass the init check or show a message
      if (get_option( 'ngg_init_check' ) != false )
        add_action( 'admin_notices', create_function('', 'echo \'<div id="message" class="error"><p><strong>' . get_option( "ngg_init_check" ) . '</strong></p></div>\';') );
    
      } else {
          //..load front end functions

    I can't figure out were in this frase the admin panel is loaded..

    Anybody some clear visions??

    cheers!

  2. Alex Rabe
    Member
    Posted 2 years ago #

    is_admin() defines what kinf of files will be loaded..

  3. wrk
    Member
    Posted 2 years ago #

    I know yeah but the admin panel is created in the 'load_dependencies' method (the nggAdminPanel class called) and not in the 'start_plugin' method. I think you commented wrong in the start_plugin method..

  4. Alex Rabe
    Member
    Posted 2 years ago #

    ok, correct. the comment is wrong or obsolete...

  5. wrk
    Member
    Posted 2 years ago #

    Thanks Alex.
    There are some more things which I think are trivial. Shall I post them here or send them by e-mail?

  6. Alex Rabe
    Member
    Posted 2 years ago #

    Open any issue at my GoogleCode project, the best place where I can track them.

    BTW : Comment if fixed : http://code.google.com/p/nextgen-gallery/source/detail?r=711

  7. wrk
    Member
    Posted 2 years ago #

    Cool! I will use this in the future.. (Y)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags