Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • No problem, glad it is getting merged into the next release. If i get time this weekend I’ll set up the plugin and see if I can fix the admin settings menu issue. I encountered this issue at a client site so I am not in front of the code base currently.

    You can edit the user-permissions.php code in the wp-content/plugins/user-permissions/user-permissions.php

    ** Make a backup first! **

    near the top of the file ( ~line 31…) change the function as follows:
    notice the //jwatson comment and the two following commented out lines.

    class User_Permissions extends UserPermission_Plugin
    {
    	function User_Permissions ()
    	{
    		$this->register_plugin ('user-perms', __FILE__);
    
    		$this->add_filter ('user_has_cap', 'check_capabilities', 10, 3);
    		$this->add_action ('the_posts');
    
    		if (is_admin ())
    		{
                            // jwatson omit duplicate display issue
    			//$this->add_action ('dbx_post_sidebar', 'edit');
    			//$this->add_action ('dbx_page_sidebar', 'edit');
    			$this->add_action ('edit_page_form', 'edit');
    			$this->add_action ('save_post');
    		}
    	}

    If your settings link is taking you to <siteroot>plugins.php?page=member_access, this is wrong (at least in my version of wordpress, 3.0.3) you can correct it by modifying this file:

    /wp-content/plugins/member-access/lib/MemberAccess.php

    search for the function “renderOptionsLink”, note the line i commented out, and the replacement beneath.

    function renderOptionsLink($links, $file)
        {
            static $plugin_dir = null;
            if(null === $plugin_dir) {
                $plugin_dir = plugin_basename(__FILE__);
                $plugin_dir = substr($plugin_dir, 0, stripos($plugin_dir, '/'));
            }
    
            if (dirname($file) == $plugin_dir) {
                $view = new MemberAccess_Structure_View('options-link.phtml');
                // jwatson fix for wp 3.0.3 this is wrong. make options-general.php
                //$view->set('link_href' , 'plugins.php?page=member_access');
                $view->set('link_href' , 'options-general.php?page=member_access');
                $view->set('link_title', sprintf(__('%s Settings', 'member_access'), 'Member Access'));
                $view->set('link_text' , __('Settings', 'member_access'));
                ob_start();
                $view->render();
                array_unshift($links, ob_get_clean());
            }
            return $links;
        }
Viewing 3 replies - 1 through 3 (of 3 total)