Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • In the network admin configuration for W3TC there is an option under miscellaneous on the general settings page to use single network configuration file for all sites.

    Forum: Hacks
    In reply to: Custom XML-RPC authentication
    slbmeh

    (@slbmeh)

    This is a rather old post, but I’ll add my two cents in case anyone were to find this post trying to provide similar functionality.

    Most authentication in my experience provide authentication support by use of the ‘wp_authenticate’ hook that is used called in wp-login.php. The xmlrpc server login does not call the authenticate hook, but instead calls the wp_authenticate function. Additionally, the login_pass_ok calls user_pass_ok, which then also calls wp_authenticate.

    The wp_authenticate function is defined in pluggable.php, so you can write a plugin that overrides the wp_authenticate function and calls the wp_authenticate action and should provide authentication through xmlrpc and any other scripted method that calls wp_authenticate.

    I was having this issue and couldn’t find the answer anywhere. In case you haven’t found out yet, and to update everyone who may come across this post like I had.

    The default functionality is to create a submenu with the same name in order for something to be selected for the menu being displayed.

    In order to change the name of the top submenu you need to add a submenu with the same slug as the parent. I don’t know what happens if you use different menu rendering functions, but I set mine to use the same. So in your function…

    function xml_test_menu() {
    	add_menu_page(__('Playlist','menu-test'), __('XML Editor','menu-test'), 'manage_options', 'larrys_xml_editor', 'xml_edit_top_level' );
    	add_submenu_page('larrys_xml_editor', __('New Name','menu-test'), __('New Name','menu-test'), 'manage_options', 'larrys_xml_editor', 'xml_edit_top_level' );
    	add_submenu_page('larrys_xml_editor', __('Add A Video','menu-test'), __('Add A Video','menu-test'), 'manage_options', "xml-add-video", "xml_add_video");
    	add_submenu_page('larrys_xml_editor', __('Delete A Video','menu-test'), __('Delete A Video','menu-test'), 'manage_options', 'xml-edit-video', 'xml_edit_video');
    }

    Or you could modify one of your existing menus instead of creating a new menu if you only wanted the two.

Viewing 3 replies - 1 through 3 (of 3 total)