WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] Problem with 3.0, unexpected T_FUNCTION (9 posts)

  1. coreybroderick
    Member
    Posted 2 years ago #

    This is a great plugin, thanks for the work so far.

    When I updated to latest version of this plugin (3.0 from 2.0.4), I received:
    Parse error: syntax error, unexpected T_FUNCTION in ******\wp-content\plugins\network-latest-posts\network-latest-posts.php on line 1092

    http://wordpress.org/extend/plugins/network-latest-posts/

  2. skepticblogsnet
    Member
    Posted 2 years ago #

    This happened to me as well. WP 3.4.1; subdirectory type network. Exactly the same error message, line etc..,

  3. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hello guys, I'm going to check this out.

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Ok guys, I think I found why this is happening. Line 1092 uses the add_action syntax for PHP 5.3, I will add support for ancient versions to avoid this behavior. I'm working on it.

  5. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hello guys, this has been fixed. Explaining a little bit this problem, I was using add_action('widgets_init', function(){ }) which is the way used in PHP versions >= 5.3, I modified this for the way it was done before add_action('widgets_init', create_function('', 'my_function')); which provides compatibility for all PHP versions.

    Thanks for your feedback, please test it and let me know if it works as expected so I can mark this topic as resolved.

    Cheers.

  6. coreybroderick
    Member
    Posted 2 years ago #

    I can confrim that fixed it for me. Works great now. Thanks so much.

  7. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Great news Corey!,

    Thanks for your feedback, have a good day.

    Cheers.

  8. skepticblogsnet
    Member
    Posted 2 years ago #

    Thanks Jose, it appears to be working- but I do have a new issue. My theme (Purity) styles nav bars pretty weirdly (tabs and large text and hover effects). I'd rather just have plain text and links, and now I'm trying to de-skin the crap out of the nav bar.

    Is there an easy way to circumvent the .nav stuff so it's just a straight text list?

  9. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hi skepticblogsnet,

    I imagined that something like this could happen, well I've added two new parameters wrapper_list_css and wrapper_block_css, these parameters allows you to override the default classes.

    Please test it and let me know what you think.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.