Parse error: syntax error, unexpected T_FUNCTION when updated wordpress

I’m getting this error after I manually updated my wordpress install:

Parse error: syntax error, unexpected T_FUNCTION

Read More

This is the code causing the error:

function paginate_links($args = ''){
$defaults = array(
    'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
    'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
    'total' => 1,
    'current' => 0,
    'show_all' => false,
    'prev_next' => true,
    'prev_text' => __('« Previous'),
    'next_text' => __('Next »'),
    'end_size' => 1,
    'mid_size' => 2,
    'type' => 'plain',
    'add_args' => false, // array of query args to add
    'add_fragment' => '');
}

Can anyone help?

Related posts

Leave a Reply

1 comment

  1. what so you mean by manually? you didn’t use the build in updater? if not did you run the update scripts?

    1. wp-admin/update.php
    2. wp-admin/upgrade.php
    3. wp-admin/update-core.php

    do one by one and see if it’s fixed in between.