Viewing 4 reply threads
  • Author
    • #246
      James Mc

      Hello Piklisters,

      Happy Friday! I believe I have found a bug in how the link URLs to settings tabs are generated. In my plugin, with a custom post type of ‘listing’, I have registered a settings page like so:

      function listing_setting_pages($pages) {
      $pages[] = array(
      'page_title' => 'Listing Settings' // Title of page
      ,'menu_title' => 'Listing Settings' // Title of menu link
      ,'sub_menu' => 'edit.php?post_type=listings' // Show this page under the post type: listings menu
      ,'capability' => 'manage_options' // Minimum capability to see this page
      ,'menu_slug' => 'listing-fields' // Menu slug
      ,'setting' => 'listing-settings' // The settings name
      ,'icon' => 'options-general' // Menu/Page Icon
      ,'default_tab'=> 'Basic' // Set a default tab

      return $pages;
      add_filter('piklist_admin_pages', 'listing_setting_pages');

      I have two settings tabs, defined like so:
      The ‘Basic’ Tab:

      Title: Real Estate Listing Settings
      Setting: listing-settings

      The Realtor Tab:

      Title: Realtor Settings Section
      Setting: listing-settings
      Tab: Realtors

      This is all working fine. The bug seems to be that the URLs for the tabs, they are generated missing the parameter ‘post_type’:
      What is generated:
      What it should be:

      Without the “post_type=listings” bit, you get a “You do not have sufficient permissions to access this page.” message when clicking on the tab links at the top of your settings pages.

    • #258
      Jason Lane

      Have you had a chance to try my jQuery Tabs modification? You should find that your tabs will work fine after the mod (by pure accident).

    • #259

      @jmcphail– Definitely a bug. We are working on a bunch of changes to settings this week. Will add this to the list.

    • #260

      @jmcphail– Fixed in v0.6.6… now available on!

    • #269
      James Mc

      Yes, this fixed it! Thank you.

      : Thank you again for posting that information. I am always interested in examples of how people do things. I think thats because I lack much imagination…

Viewing 4 reply threads
  • You must be logged in to reply to this topic.