• Resolved Peter

    (@hardpeter4u)


    Hi,

    This newest update broke my site (admin included). I had to go into recovery mode to rectify the issue.

    An error of type E_COMPILE_ERROR was caused in line 4283 of the file /home/mysite/mysite.com/wp/wp-content/plugins/post-grid/includes/blocks/functions-blocks.php. Error message: Cannot redeclare custom_wpkses_post_tags() (previously declared in /home/mysite/mysite.com/wp/wp-content/mu-plugins/mysite-custom-functions.php:51)

    This error involves this:

    mysite-custom-funcitons.php :
    function custom_wpkses_post_tags( $tags, $context ) {

    if ( 'post' === $context ) {
        $tags['iframe'] = array(
            'src'             => true,
            'height'          => true,
            'width'           => true,
            'frameborder'     => true,
            'scrolling'       => true,
            'allowfullscreen' => true,
        );
    }
    
    return $tags;

    }

    add_filter( ‘wp_kses_allowed_html’, ‘custom_wpkses_post_tags’, 10, 2 );

    post-grid funcitons-blocks.php :
    function custom_wpkses_post_tags($tags, $context)
    {
    //if (‘post’ === $context) {
    $tags[‘iframe’] = array(
    ‘src’ => true,
    ‘height’ => true,
    ‘width’ => true,
    ‘frameborder’ => true,
    ‘allowfullscreen’ => true,
    );
    //}
    return $tags;
    }
    add_filter(‘wp_kses_allowed_html’, ‘custom_wpkses_post_tags’, 10, 2);

    How can this be fixed? I need my custom functions for my site.

    Thanks,

    Peter

    • This topic was modified 1 month, 3 weeks ago by Peter.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.