WordPress.org

Ready to get started?Download WordPress

Forums

Pretty Link Lite
[resolved] Prettylink XMLRPC not working in WP.3.5 (3 posts)

  1. Ash
    Member
    Posted 1 year ago #

    The latest version of PrettyLink is not compatible with the recent changes in WP3.5 with the XMLRPC.

    I had to go in prli-xmlrpc.php and comment out all the checks for the enable_xmlrpc flag in order to be able to use the API of my blog.

    If there is a better way, then please let me know.

    if ( !get_option( 'enable_xmlrpc' ) )
    return new IXR_Error( 401, __( 'Sorry, XML-RPC Not enabled for this website' , 'pretty-link') );

    I tried adding enable_xmlrpc in the options table and that didn't work, id rather change the code of a plugin that mess with WP settings anyway.

    Thanks!

    http://wordpress.org/plugins/pretty-link/

  2. cartpauj
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ash,
    That will work for now. I'll get this on Blair's bug tracker for Pretty Link. We don't have many people using the API, so we don't get this kind of feedback very often. Thanks for the heads up!

  3. Ash
    Member
    Posted 1 year ago #

    No problem. Glad I was able to help. While we are on the topic, I also noticed that attempt to retrieve a prettylink record by slug throws an exception if the PL is not found, a better way (from the caller's perspective) is to simply return false or null instead of just throwing an exception.

    That way the caller can do something as simple as:

    if(!get_pretty_link(slug))
    {
    add_pretty_link(...);
    }

    Or if you feel strongly about throwing an exception then maybe add another method that checks if the slug exists: bool exists(slug);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic