WordPress.org

Ready to get started?Download WordPress

Forums

Category Posts in Custom Menu
[resolved] PHP 5.5 preg_replace() /e modifier depricated (3 posts)

  1. swinggraphics
    Member
    Posted 7 months ago #

    Here are the changes to make for 5.5 compatibility:

    Change

    $string = preg_replace("/\%post_date_gmt\(([a-zA-Z\s\\\\:,]*)\)/e", "mysql2date('$1', '$post_date_gmt')", $string);

    to

    $string = preg_replace_callback("/\%post_date_gmt\(([a-zA-Z\s\\\\:,]*)\)/", create_function('$matches', 'return mysql2date($matches[1], $post_date_gmt);'), $string);

    Change

    $string = preg_replace("/\%post_date\(([a-zA-Z\s\\\\:,]*)\)/e", "mysql2date('$1', '$post_date')", $string);

    to

    $string = preg_replace_callback("/\%post_date\(([a-zA-Z\s\\\\:,]*)\)/", create_function('$matches', 'return mysql2date($matches[1], $post_date);'), $string);

    Change

    $string = preg_replace("/\%post_modified_gmt\(([a-zA-Z\s\\\\:,]*)\)/e", "mysql2date('$1', '$post_modified_gmt')", $string);

    to

    $string = preg_replace_callback("/\%post_modified_gmt\(([a-zA-Z\s\\\\:,]*)\)/", create_function('$matches', 'return mysql2date($matches[1], $post_modified_gmt);'), $string);

    Change

    $string = preg_replace("/\%post_modified\(([a-zA-Z\s\\\\:,]*)\)/e", "mysql2date('$1', '$post_modified')", $string);

    to

    $string = preg_replace_callback("/\%post_modified\(([a-zA-Z\s\\\\:,]*)\)/", create_function('$matches', 'return mysql2date($matches[1], $post_modified);'), $string);

  2. Diana Koenraadt
    Member
    Plugin Author

    Posted 7 months ago #

    Thank you for reporting, this will be fixed in the next version. Working on it right now.

    Kind regards,
    Diana

  3. Diana Koenraadt
    Member
    Plugin Author

    Posted 7 months ago #

    Fixed in 0.9.1

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.