Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • UPDATE: I know see that 4.4 failed to update. Think I will wait for 4.5 before going any further.

    Hi, had the same problem and looked at a back up of my old misc.php file.
    I don’t know much about php but the difference in the files in the last function at 900 was easy to spot.

    using an FTP program (filezilla) I edited the misc.php and replaced the last function with the fuction below. Just make copy and paste. Ensure to leave the last two line after </script>.

    I have no idea what effect this has on other things but it got me back to my dashboard. I looks like just the defintions of the array was missing.

    function wp_admin_canonical_url() {
    $removable_query_args = array(
    ‘message’, ‘settings-updated’, ‘saved’,
    ‘update’, ‘updated’, ‘activated’,
    ‘activate’, ‘deactivate’, ‘locked’,
    ‘deleted’, ‘trashed’, ‘untrashed’,
    ‘enabled’, ‘disabled’, ‘skipped’,
    ‘spammed’, ‘unspammed’,
    );

    /**
    * Filter the list of URL parameters to remove.
    *
    * @since 4.2.0
    *
    * @param array $removable_query_args An array of parameters to remove from the URL.
    */
    $removable_query_args = apply_filters( ‘removable_query_args’, $removable_query_args );

    if ( empty( $removable_query_args ) ) {
    return;
    }

    // Ensure we’re using an absolute URL.
    $current_url = set_url_scheme( ‘https://&#8217; . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’] );
    $filtered_url = remove_query_arg( $removable_query_args, $current_url );
    ?>
    <link id=”wp-admin-canonical” rel=”canonical” href=”<?php echo esc_url( $filtered_url ); ?>” />
    <script>
    if ( window.history.replaceState ) {
    window.history.replaceState( null, null, document.getElementById( ‘wp-admin-canonical’ ).href + window.location.hash );
    }
    </script>

    Thread Starter stuartfisher

    (@stuartfisher)

    Thanks Devin, I’ll put that into practice later. I’m sure it will do the job.
    Thanks in advance.
    Stuart

    Thread Starter stuartfisher

    (@stuartfisher)

    Hi,
    Thanks for the Link. I will use that in furture. In the mean time you can find the page in question at:https://www.papparoma.org.uk/reservations/

    Thanks in advance.
    Stuart

Viewing 4 replies - 1 through 4 (of 4 total)