Forum Replies Created

Viewing 14 replies - 16 through 29 (of 29 total)
  • It seems this plugin was also banned from Pagely.

    I have submitted a request for their engineering department to reconsider their position. I have pointed them to this article, and informed them of GoDaddy’s decision.

    Definitely +1! You can’t sell digital products without an option to offer several versions.

    Ok, I figured out what my issue was.

    I was using the link=”none” attribute in my shortcode. In JetPack 2.9.x, this did not cause any issues. However, in 3.0.x, the function ‘rectangular_talavera’ in /jetpack/modules/tiled-gallery/tiled-gallery.php performs a check before assigning the link. “none” was stopping the function from printing the anchor tag. Changing the link attribute to either “attachment” or “file” fixed the issue.

    Thanks for checking into this.

    I compared the HTML from both JetPack versions and they are the same, except for a few data attributes, like data-carousel-extra. Maybe something like this is affecting your regex?

    I figured out my issue in number two above.

    This piece of code:

    // JetPack masonry gallery shortcode.
    $gallery = '[gallery type="rectangular" link="none" ids="' . $thumbnail_ids . '"]';
    echo do_shortcode( $gallery );

    was preventing Photon from filtering the content. Photon only filters the post content using the ‘the_content’ filter, and the post thumbnails using the ‘image_downsize’ filter.

    I modified my code above to pass through the ‘the_content’ filter as follows:

    // JetPack masonry gallery shortcode.
    $gallery = '[gallery type="rectangular" link="none" ids="' . $thumbnail_ids . '"]';
    
    // Deprecated because no 'the_content' filters are applied.
    // echo do_shortcode( $gallery );
    
    // Apply 'the_content' filter to the gallery.
    // If we simply echo do_shortcode(), filters like Photon will not work.
    // @link http://wordpress.org/support/topic/shortcode-and-the_content
    // @link http://stackoverflow.com/questions/12305778/wordpress-the-content-parse-outside-the-loop
    echo apply_filters( 'the_content', $gallery );

    This solved my second issue. I still do not know how to fix number one, but I will close this thread and open a new one specifically for that.

    Hernan Villanueva

    (@chvillanuevap)

    Add this to your CSS:

    .sd-button span.share-count {
        display: none;
    }
    Hernan Villanueva

    (@chvillanuevap)

    For anyone else interested, the issue was that the customer was paying with a check, and hence the order would not be labeled as “Processed” or “Completed” right away, but rather as “Pending”. It seems that for the plugin to work correctly, the order must either be labeled as “Processed” or “Completed” immediately after purchase.

    Forum: Plugins
    In reply to: [WP Retina 2x] Lazy Load

    I haven’t had any time to think more about this issue. I’m going to close this thread for now, at least until more browsers support the srcset attribute.

    Thanks again for a great plugin!

    Forum: Plugins
    In reply to: [WP Retina 2x] Lazy Load

    Ok, I think I figured out what is going on.

    The Lazy Load plugins hooks itself to:

    add_filter( 'the_content', array( __CLASS__, 'add_image_placeholders' ), 99 );

    and happens before WP Retina 2x’s hook:

    add_action( 'wp_head', 'wr2x_srcset_buffer_start' );

    Let’s say we have an image as follows:

    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300">

    Lazy Load grabs this image and turns it into:

    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/plugins/lazy-load/images/1x1.trans.gif" data-lazy-src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300">
    <noscript>
    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300">
    </noscript>

    Your plugin now comes along and looks for all the src attributes in all <img> tags. First, it sees the src attribute pointing to the 1×1.trans.gif image, which does not have a @2x counterpart, and therefore it ignores this tag. Then, it sees the src attribute in the <img> tag inside the <noscript>, which has the correct src pointing to the actual image, and it is able to locate the @2x image. However, this is of no use since our goal is to include the correct path in the first <img> tag.

    It ends up looking like this:

    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/plugins/lazy-load/images/1x1.trans.gif" data-lazy-src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300" scale="0">
    <noscript>
    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300" srcset="http://localhost/thepostmansknock/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300@2x.png 2x">
    </noscript>

    I was able to get it to work with the following hack in wp-retina-2x.php:

    $img_info = parse_url( $tag->getAttribute('data-lazy-src') );

    so now my HTML looks initially like:

    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/plugins/lazy-load/images/1x1.trans.gif" data-lazy-src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300" srcset="http://localhost/thepostmansknock/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300@2x.png 2x" scale="0">
    <noscript>
    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300">
    </noscript>

    and once it is loaded:

    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300" srcset="http://localhost/thepostmansknock/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300@2x.png 2x" scale="0" data-lazy-loaded="true" style="display: block;">
    <noscript>
    <img class="size-medium wp-image-4048 aligncenter" alt="Test 1" src="http://localhost/thepostmansknock/wp-content/uploads/2013/11/Test-1-267x300.png" width="267" height="300">
    </noscript>

    The <noscript> tag does not have the srcset attribute, which is okay because I’m working on the assumption that if you are using a Retina-ready device, you have JavaScript enabled. However, now only the images with the data-lazy-src attribute are Retina ready, which are only the images inside the content of the post.

    This hack is not a recommended nor a permanent solution though. The issue with this Lazy Load plugin is that it needs to load after your plugin has worked its magic for all to display correctly. Since one hooks to the_content filter and the other to the wp_head action, it seems unlikely this is possible.

    At the same time, using the srcset attribute would overwrite the src with the transparent gif image placeholder, completely killing the purpose of lazy loading. I am going to put some thought into this issue. Let me know if you have any ideas and thanks again for a great plugin.

    @timit I see the checkbox in Chrome’s latest version. What browser are you using?

    You will probably need to apply some CSS styling in your theme’s stylesheet.

    Did you try going to WooCommerce >> Settings >> General tab?

    There is an option to set the gift wrapping to be active by default.

    See the documentation:

    https://github.com/mikejolley/woocommerce-product-gift-wrap

    As an addendum, my current idea is that by the time WordPress call for the archive-portfolio template, the pre_get_posts hook has already been executed. Is this correct or is this a different issue?

Viewing 14 replies - 16 through 29 (of 29 total)