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

    (@kevinvess)

    Try adding this conditional statement to the v_forcelogin() function. Let me know if this works for you.

    https://gist.github.com/kevinvess/7b4478446bcec77b4916#file-wp-force-login-xmlrpc-php-L6

    Thread Starter dakiva

    (@dakiva)

    Hi Kevin,

    Thank you very much – It appears that the conditional statement worked!
    I can now reach https://intranet/xmlrpc.php in a browser. This was also confirmed with the network sniffer.

    I still cannot post from Word but at least I am hitting the correct URL.

    Thanks again.

    Plugin Author Kevin Vess

    (@kevinvess)

    I thought I would update this thread with a new/easier way to resolve your issue using the latest version of the plugin (version 3.0).

    Now with version 3.0, you can whitelist the xmlrpc.php URL to allow remote publishing by adding the following code to your theme’s functions.php file:

    /**
     * Filter Force Login to allow exceptions for specific URLs.
     *
     * @return array An array of URLs. Must be absolute.
     **/
    function my_forcelogin_whitelist() {
      return array(
        site_url( '/xmlrpc.php' )
      );
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add an exclusion – to allow xmlrpc.php’ is closed to new replies.