Support » Plugin: scbFramework » scbFramework questions

  • First of all, thank you for sharing scbFramework with us!

    I’m looking at the Smart Archive Reloaded plugin to understand the basic workflow with the framework and I’m wondering why did you create a register mechanism in the AdminPage class instead of just instantiating an object and using it that way?

    Does it have to do with keeping the admin functionality in a separate file? What is the philosophy?

    Also, which functions did you choose to name with a leading underscore? I see not all named that way are private and not all private functions have such a name convention. Is there a different rationale?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Another quick question (I’m just gonna add these as I begin to understand more – hope you don’t mind).

    Why is the ‘toplevel’ argument of the AdminPage is allowed to be any string? Is doesn’t seem to work with anything else but ‘menu’.

    Thank you.

    Plugin Author scribu

    (@scribu)

    why did you create a register mechanism in the AdminPage class instead of just instantiating an object and using it that way?

    The registration mechanism allows third-party code to disable or replace the settings page for that plugin.

    Also, which functions did you choose to name with a leading underscore? I see not all named that way are private and not all private functions have such a name convention. Is there a different rationale?

    Methods that begin with an underscore are meant to be private, but I can’t use the ‘private’ keyword because they are used as callbacks for various actions and filters.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘scbFramework questions’ is closed to new replies.