• Resolved flynsarmy

    (@flynsarmy)


    You recently updated echo_ald_crp to add a $cache = 0 argument. This wasn’t the best move as ald_crp (which echo_ald_crp calls) accepts an array containing a variety of options. You’re limiting yourself unnecessarily. You should use the following instead:

    function echo_ald_crp( $args ) {
    	echo ald_crp( $args );
    }

    For reference what you currently have is:

    function echo_ald_crp($cache = 0) {
    	echo ald_crp('is_widget=0&cache='.$cache);
    }

    is_widget already defaults to 0 in the ald_crp() method and cache defaults to 0 in crp_default_options().

    Another benefit of this approach is that it will ALWAYS obey the user’s settings in admin. The version you have not only limits what you can do with echo_ald_crp, it actively ignores a users preferences.

    http://wordpress.org/plugins/contextual-related-posts/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    Thanks for this. I’ll incorporate the method you mention above. I agree it makes sense to keep echo_ald_crp completely flexible.

    Plugin Author Ajay

    (@ajay)

    I have included this in v1.8.10

    Not good.

    This change caused the following error : Missing argument 1 for echo_ald_crp()

    for some of the posts.
    Reverting it to the old code fixed the problem.

    Look into it.

    Fili

    Thread Starter flynsarmy

    (@flynsarmy)

    Ahh damn. Should be

    function echo_ald_crp( $args = array() ) {

    for backwards compatability

    Plugin Author Ajay

    (@ajay)

    I’ve pushed through a new update with the updated patch above.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[PATCH] Better handling of echo_ald_crp’ is closed to new replies.