• Resolved Nasah

    (@nasah)


    Hi Bob, first of all, thx for a great and very flexible plugin. Love it a bunch. I was just wondering, how can I use a custom default topbar at installation? Now when I install this, I get my custom samples, but the default row in topbar stays the same. Any way to change this, so my custombar gets loaded to the AllTopbars instead of just the SampleTopbars “directory”? Thx again ??

    https://www.ads-software.com/plugins/wp-topbar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author rfgoetz

    (@rfgoetz)

    I have a way that I’ve seen other plugins do it. They allow you to use a custom PHP function to override default values.

    I have coded up a way, would you be willing to test it?

    If so, send me your email address and I will send you the beta code:

    https://zwebify.com/contact/

    Here are the instructions that I wrote up:

    //How to create your own Custom Default TopBar
    //
    // When the plugin is asked to create a new default TopBar, it first loads the array wptbOptions[]
    // with all of the default values. Then, it looks to see if this function 'wptb_custom_default_values'
    // exists.  If it does, it will call that function.  That function should ONLY update values in the
    // wptbOptions[] array.
    //
    // You can copy this sample function into your theme's function.php or
    // some other file that is loaded on your admin pages.
    //
    // Change any options below to match what you want in your own custom default TopBar.
    //
    // To see how to set the options, you can create a TopBar via the user interface, then export it.
    // The export file will show you how to set each of the options below.
    //
    // sample code goes here....
    Thread Starter Nasah

    (@nasah)

    Hi Bob, thx for the quick reply. I would like to test it, so sending you an email straight away ??

    Plugin Author rfgoetz

    (@rfgoetz)

    Added feature to v. 5.23.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom topbar as default’ is closed to new replies.