• Closed
  • Timothy Hall
    Spectator
    April 27, 2015 at 4:41 pm #16975

    When using Jetpack’s “Tiled Galleries” feature, thumbnails are linking to the Attachment Page instead of to the images themselves.

    I first posted this here.. and Alex suggested I start a new thread (here).

    Alex said..

    Could you search for the following code inside Justified Image Grid, and let me know what comes after?

    add_filter( ‘post_gallery’

    Thanks!


    @mendocinotim
    As Alex mentioned, could you please start your own thread, as per the Forum Welcome?
    http://wordpress.org/support/plugin/jetpack#postform

    Thank you!

    I spooked around in the Jetpack Plugin Directory until I found the following file..
    /wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.php
    ..Where I found (starting on line 31) the following code:

    function init() {
    if ( $this->maybe_disable_jp_carousel() )
    return;

    $this->in_jetpack = ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'enable_module_configurable' ) ) ? true : false;

    if ( is_admin() ) {
    // Register the Carousel-related related settings
    add_action( 'admin_init', array( $this, 'register_settings' ), 5 );
    if ( ! $this->in_jetpack ) {
    if ( 0 == $this->test_1or0_option( get_option( 'carousel_enable_it' ), true ) )
    return; // Carousel disabled, abort early, but still register setting so user can switch it back on
    }
    // If in admin, register the ajax endpoints.
    add_action( 'wp_ajax_get_attachment_comments', array( $this, 'get_attachment_comments' ) );
    add_action( 'wp_ajax_nopriv_get_attachment_comments', array( $this, 'get_attachment_comments' ) );
    add_action( 'wp_ajax_post_attachment_comment', array( $this, 'post_attachment_comment' ) );
    add_action( 'wp_ajax_nopriv_post_attachment_comment', array( $this, 'post_attachment_comment' ) );
    } else {
    if ( ! $this->in_jetpack ) {
    if ( 0 == $this->test_1or0_option( get_option( 'carousel_enable_it' ), true ) )
    return; // Carousel disabled, abort early
    }
    // If on front-end, do the Carousel thang.
    $this->prebuilt_widths = apply_filters( 'jp_carousel_widths', $this->prebuilt_widths );
    add_filter( 'post_gallery', array( $this, 'enqueue_assets' ), 1000, 2 ); // load later than other callbacks hooked it
    add_filter( 'post_gallery', array( $this, 'set_in_gallery' ), -1000 );
    add_filter( 'gallery_style', array( $this, 'add_data_to_container' ) );
    add_filter( 'wp_get_attachment_image_attributes', array( $this, 'add_data_to_images' ), 10, 2 );
    }

    if ( $this->in_jetpack && method_exists( 'Jetpack', 'module_configuration_load' ) ) {
    Jetpack::enable_module_configurable( dirname( dirname( __FILE__ ) ) . '/carousel.php' );
    Jetpack::module_configuration_load( dirname( dirname( __FILE__ ) ) . '/carousel.php', array( $this, 'jetpack_configuration_load' ) );
    }
    }

    Is that what you wanted me to find?

    Timothy Hall
    Spectator
    Posts: 9
    April 29, 2015 at 8:14 pm #17058

    Actually no.
    I have the built-in (Alora theme) lightbox enabled; and still, it’s working properly now.
    The only thing I had to do to get everything working was to add the “Royal PrettyPhoto” plugin.

    My understanding is that Alora uses this invisibly; and the built-in version was not linking the images as a gallery set; but by manually adding the “Royal PrettyPhoto” plugin and enabling it, this (for some reason) does correct this issue.

    You might want to have a look at this requirement, since I’m sure you never intended this.

    Roman
    Spectator
    Posts: 3147
    April 29, 2015 at 8:52 pm #17059

    that’s pretty weird