WordPress.org

Ready to get started?Download WordPress

Forums

WP-prettyPhoto
Syntax Error autoplay: , (4 posts)

  1. Rhand
    Member
    Posted 2 years ago #

    On line 48 of every pages I get a JavaScript Error Syntax Error. on that line it says autoplay: , It seems to be part of Pretty Photo and is seems to have no value . Any fix for this?

    http://wordpress.org/extend/plugins/wp-prettyphoto/

  2. Rhand
    Member
    Posted 2 years ago #

    With true to autoplay selected this error is no longer displayed. Not sure yet that is wanted though..
    Other issue are that top title in pop-up is not displayed properly as background is white and height is too small and that theme selection does not seem to work

  3. Eric McNiece
    Member
    Posted 2 years ago #

    Yours actually works after setting autoplay? Nice, I get more errors.

    The error on line 48 is because jQuery expect a variable for autoplay, but when it's set to 'false' (by default) no variable is displayed. So all we need to do is get the PHP to output '0' instead of nothing.

    If you pop open /wp-content/plugins/wp-prettyphoto/wp-prettyphoto.php and head down to line 416, you'll see this:

    $wppp_autoplay = $this->wppp_autoplay;

    Add a little something on the end so it looks like so:

    $wppp_autoplay = $this->wppp_autoplay | '0';

    This way, if autoplay is false PHP will actually output 0 as a string instead of nothing at all.

    Hope that helps!

  4. Rhand
    Member
    Posted 2 years ago #

    @ emcniece Thanks! Very hepful.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic