Plugin Directory

Changeset 1531227


Ignore:
Timestamp:
11/09/2016 08:51:49 PM (9 years ago)
Author:
endortrails
Message:

2.2.11

  • Fix: Double featured images in some themes
  • Fix: SEO plugin conflict
  • Fix: Add sell_media_content_loop function in deprecated list
  • New: Add products column filter
Location:
sell-media/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • sell-media/trunk/inc/admin-payments.php

    r1525073 r1531227  
    404404            if ( $products ) foreach ( $products as $product ) {
    405405                $type = ( ! empty( $product['type'] ) ) ? ' (' . $product['type'] . ') ' : '';
    406                 echo $product['name'] . $type . '<br />';
     406                echo apply_filters( 'sell_media_payment_products_column', $product['name'] . $type, $post_id ) . '<br />';
    407407            }
    408408            break;
  • sell-media/trunk/inc/class-layouts.php

    r1528637 r1531227  
    6363        add_filter( 'the_content', array( $this, 'after_content' ) );
    6464
     65        // Remove prepended attachment from attachment template in core WP
     66        add_filter( 'prepend_attachment', array( $this, 'remove_prepend_attachment' ) );
     67
    6568        // Content loop
    6669        add_filter( 'sell_media_content_loop',  array( $this, 'content_loop' ), 10, 3 );
     
    288291
    289292    /**
     293     * Remove the prepended attachment from WordPress core attachment template
     294     * since we're already appending it via the_content filter
     295     * @return
     296     */
     297    function remove_prepend_attachment( $p ) {
     298
     299        global $post;
     300
     301        if ( sell_media_attachment( $post->ID ) ) {
     302            $p = '';
     303        }
     304
     305        return $p;
     306    }
     307
     308    /**
    290309     * Main content loop used in all themes
    291310     * @return string html
  • sell-media/trunk/inc/class-search.php

    r1525073 r1531227  
    113113
    114114        // only run the query on the actual search results page.
    115         if ( is_page( $settings->search_page ) && 1 === did_action( 'the_post' ) ) {
     115        if ( is_page( $settings->search_page ) && in_the_loop() ) {
    116116
    117117            // The search terms
  • sell-media/trunk/inc/deprecated.php

    r1525073 r1531227  
    3535    sell_media_get_taxonomy_terms( 'collection' );
    3636}
     37
     38/**
     39 * Sell Media content loop.
     40 *
     41 * @deprecated 2.2.6 Use sell_media_content_loop filter.
     42 */
     43function sell_media_content_loop( $post_id, $index ) {
     44    _deprecated_function( __FUNCTION__, '2.2.6', 'sell_media_content_loop filter' );
     45    return apply_filters( 'sell_media_content_loop', $post_id, $index );
     46}
  • sell-media/trunk/inc/helpers.php

    r1527623 r1531227  
    2323    $post_type = array( 'sell_media_item', 'attachment' );
    2424    $sell_media_taxonomies = get_object_taxonomies( $post_type );
     25    $sm_archive_template = SELL_MEDIA_PLUGIN_DIR . '/themes/archive.php';
    2526
    2627    /**
     
    3132        if ( $overridden_template = locate_template( 'archive-sell-media.php' ) ) {
    3233            $template = $overridden_template;
     34        } elseif ( file_exists( $sm_archive_template ) ) {
     35            $template = $sm_archive_template;
    3336        } else {
    34             $template = SELL_MEDIA_PLUGIN_DIR . '/themes/archive.php';
     37            $template = $original_template;
    3538        }
    3639    } elseif ( sell_media_attachment( $post->ID ) ) {
  • sell-media/trunk/inc/shortcodes.php

    r1525073 r1531227  
    185185                    <div class="item-image">
    186186                        <?php
    187                         if ( ! empty( $item['item_attachment'] ) ){
    188                             echo sell_media_item_icon( $item['item_attachment'] );
     187                        if ( ! empty( $item['item_attachment'] ) ) {
     188                            // if selling video or audio, show the post_id thumbnail
     189                            if ( SellMediaAudioVideo::is_video_item( $item['item_id'] ) || SellMediaAudioVideo::is_audio_item( $item['item_id'] ) ) {
     190                                echo sell_media_item_icon( $item['item_id'] );
     191                            } else {
     192                                echo sell_media_item_icon( $item['item_attachment'] );
     193                            }
    189194                        }
    190195                        ?>
  • sell-media/trunk/readme.txt

    r1528637 r1531227  
    66Requires at least: 3.4
    77Tested up to: 4.5.2
    8 Stable tag: 2.2.9
     8Stable tag: 2.2.11
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    215215
    216216== Changelog ==
     217
     218= 2.2.11 =
     219* Fix: Double featured images in some themes
     220* Fix: SEO plugin conflict
     221* Fix: Add sell_media_content_loop function in deprecated list
     222* New: Add products column filter
    217223
    218224= 2.2.10 =
  • sell-media/trunk/sell-media.php

    r1528637 r1531227  
    44 * Plugin URI: http://graphpaperpress.com/plugins/sell-media/
    55 * Description: A plugin for selling photos, prints and other downloads.
    6  * Version: 2.2.10
     6 * Version: 2.2.11
    77 * Author: Graph Paper Press
    88 * Author URI: http://graphpaperpress.com
     
    2525 * @category Core
    2626 * @author Thad Allender
    27  * @version 2.2.10
     27 * @version 2.2.11
    2828 */
    2929
     
    178178            // Plugin version.
    179179            if ( ! defined( 'SELL_MEDIA_VERSION' ) ) {
    180                 define( 'SELL_MEDIA_VERSION', '2.2.10' );
     180                define( 'SELL_MEDIA_VERSION', '2.2.11' );
    181181            }
    182182
  • sell-media/trunk/themes/archive.php

    r1525073 r1531227  
    2323                <h1 class="sell-media-page-title">
    2424                    <?php
    25                         if ( is_search() ) {
    26                             printf( __( 'Search results for: %1$s', 'sell_media' ), get_search_query() );
    27                         } elseif ( is_post_type_archive( 'sell_media_item' ) ) {
    28                             $obj = get_post_type_object( 'sell_media_item' );
    29                             echo esc_attr( ucfirst( $obj->rewrite['slug'] ) );
    30                         } else {
    31                             the_archive_title();
    32                         }
     25                    if ( is_search() ) {
     26                        printf( __( 'Search results for: %1$s', 'sell_media' ), get_search_query() );
     27                    } elseif ( is_post_type_archive( 'sell_media_item' ) ) {
     28                        $obj = get_post_type_object( 'sell_media_item' );
     29                        echo esc_attr( ucfirst( $obj->rewrite['slug'] ) );
     30                    } else {
     31                        the_archive_title();
     32                    }
    3333                    ?>
    3434                </h1>
    3535                <?php
    36                     $term_description = term_description();
    37                     if ( ! empty( $term_description ) ) {
    38                         echo '<h2 class="collection_description">' . $term_description . '</h2>';
    39                     }
     36                $term_description = term_description();
     37                if ( ! empty( $term_description ) ) {
     38                    echo '<h2 class="collection_description">' . $term_description . '</h2>';
     39                }
    4040                ?>
    4141                <?php echo do_shortcode( '[sell_media_searchform]' ); ?>
     
    4848            <?php
    4949            // check if this term has child terms, if so, show terms
    50             $term_ID = $wp_query->get_queried_object_id();
    51             $children = get_term_children( $term_ID, 'collection' );
     50            $term_id = $wp_query->get_queried_object_id();
     51            $children = get_term_children( $term_id, 'collection' );
    5252
    5353            if ( $children ) :
     
    5858                    'orderby' => 'name',
    5959                    'hide_empty' => false,
    60                     'parent' => $term_ID
     60                    'parent' => $term_id,
    6161                );
    6262
     
    7373                            'taxonomy' => 'collection',
    7474                            'field' => 'slug',
    75                             'term' => $child->slug
     75                            'term' => $child->slug,
    7676                        );
    7777                        $posts = New WP_Query( $args );
     
    7979                        $post_count = $posts->found_posts;
    8080
    81                         if ( $post_count != 0 ) : $i++; ?>
     81                        if ( $post_count != 0 ) :
     82                            $i++; ?>
    8283
    8384                            <div class="<?php echo apply_filters( 'sell_media_grid_item_class', 'sell-media-grid-item', NULL ); ?>">
     
    137138            </div><!-- .sell-media-grid-item-container -->
    138139            <?php
    139             if( !$children ){
    140                 echo sell_media_pagination_filter( $wp_query->max_num_pages ); 
     140            if ( ! $children ) {
     141                echo sell_media_pagination_filter( $wp_query->max_num_pages );
    141142            }
    142143            ?>
Note: See TracChangeset for help on using the changeset viewer.