Plugin Directory

Changeset 1411753


Ignore:
Timestamp:
05/06/2016 02:35:43 PM (10 years ago)
Author:
edpittol
Message:

updated the plugin version to 0.5.3

Location:
hookit-related-products
Files:
33 added
4 edited

Legend:

Unmodified
Added
Removed
  • hookit-related-products/trunk/hookit-recommended-products.php

    r1408115 r1411753  
    33/**
    44 * Plugin Name: Hookit Recommended Products
    5  * Version: 0.5.2
     5 * Version: 0.5.3
    66 * Plugin URI: https://bitbucket.org/edpittol/hookit-recommended-products
    77 * Description: WordPress plugin to get Hookit related products from a post
  • hookit-related-products/trunk/includes/filters.php

    r1337359 r1411753  
    1111    if( is_singular() ) {
    1212        ob_start();
    13         require_once __DIR__ . '/../views/recommended-products.php';
     13        require __DIR__ . '/../views/recommended-products.php';
    1414        $content .= ob_get_clean();
    1515    }
  • hookit-related-products/trunk/includes/functions.php

    r1408115 r1411753  
    66
    77/**
    8  * Verify if the category must process the products.
     8 * Verify if the category must process the products. If any category was
     9 * selected, consider apply the recommended products for all.
    910 *
    1011 * @param WP_Term $category The category
     
    1213 */
    1314function hookit_recommended_products_is_active_category( $category ) {
    14     return in_array( $category->term_id, get_option( 'hookit_recommended_products_categories' ) );
     15    $categories = get_option( 'hookit_recommended_products_categories', array() );
     16    if( empty( $categories ) ) {
     17        return true;
     18    }
     19   
     20    return in_array( $category->term_id, $categories );
    1521}
    1622
  • hookit-related-products/trunk/readme.txt

    r1408115 r1411753  
    3535== Changelog ==
    3636
     37= 0.5.3 =
     38* Consertado múltiplas chamadas ao filtro the_content
     39* Ativa os produtos recomendados para todas categorias se nenhuma categoria for selecionada
     40
    3741= 0.5.2 =
    3842* Consertado retorno de erro do web service, quando existir
Note: See TracChangeset for help on using the changeset viewer.