Plugin Directory

Changeset 1419823


Ignore:
Timestamp:
05/18/2016 05:48:27 PM (10 years ago)
Author:
edpittol
Message:

updated the plugin version to 0.6.1

Location:
hookit-related-products
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • hookit-related-products/tags/0.6.1/includes/filters.php

    r1419819 r1419823  
    1111function hookit_recommended_products_the_content( $content ) {
    1212    if( is_singular() ) {
    13         ob_start();
    14         hookit_recommended_products_consume_ws( 'ping' );
    15         require __DIR__ . '/../views/recommended-products.php';
    16         $content .= ob_get_clean();
     13        $products = hookit_recommended_products_get_products( get_the_ID() );
     14       
     15        // Doesn't show recommended products elements if the post hadn't or deactivated for the post
     16        if( is_array( $products ) && hookit_recommended_products_is_active_post( get_the_ID() ) ) {
     17            ob_start();
     18            hookit_recommended_products_consume_ws( 'ping' );
     19            require __DIR__ . '/../views/recommended-products.php';
     20            $content .= ob_get_clean();
     21        }
    1722    }
    1823
  • hookit-related-products/tags/0.6.1/views/recommended-products.php

    r1419819 r1419823  
    22
    33defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    4 
    5 $products = hookit_recommended_products_get_products( get_the_ID() );
    6 
    7 // Doesn't show recommended products elements if the post hadn't or deactivated for the post
    8 if( is_array( $products ) && hookit_recommended_products_is_active_post( get_the_ID() ) ) :
    94
    105?>
     
    5550    <?php do_action( 'hookit_recommended_products_after_products' ) ?>
    5651</div>
    57 <?php endif; ?>
  • hookit-related-products/trunk/includes/filters.php

    r1419819 r1419823  
    1111function hookit_recommended_products_the_content( $content ) {
    1212    if( is_singular() ) {
    13         ob_start();
    14         hookit_recommended_products_consume_ws( 'ping' );
    15         require __DIR__ . '/../views/recommended-products.php';
    16         $content .= ob_get_clean();
     13        $products = hookit_recommended_products_get_products( get_the_ID() );
     14       
     15        // Doesn't show recommended products elements if the post hadn't or deactivated for the post
     16        if( is_array( $products ) && hookit_recommended_products_is_active_post( get_the_ID() ) ) {
     17            ob_start();
     18            hookit_recommended_products_consume_ws( 'ping' );
     19            require __DIR__ . '/../views/recommended-products.php';
     20            $content .= ob_get_clean();
     21        }
    1722    }
    1823
  • hookit-related-products/trunk/views/recommended-products.php

    r1419216 r1419823  
    22
    33defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    4 
    5 $products = hookit_recommended_products_get_products( get_the_ID() );
    6 
    7 // Doesn't show recommended products elements if the post hadn't or deactivated for the post
    8 if( is_array( $products ) && hookit_recommended_products_is_active_post( get_the_ID() ) ) :
    94
    105?>
     
    5550    <?php do_action( 'hookit_recommended_products_after_products' ) ?>
    5651</div>
    57 <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.