Plugin Directory

Changeset 2089782


Ignore:
Timestamp:
05/17/2019 10:12:09 AM (7 years ago)
Author:
frankschrijvers
Message:

removed structured data, fixed error ehen shortcode and widget are used on same page

Location:
wpstudio-testimonial-slider/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpstudio-testimonial-slider/trunk/genesis-testimonials.php

    r1978852 r2089782  
    44 * Plugin URI: http://wpstud.io/plugins
    55 * Description: The Genesis Testimonials Slider is a simple-to-use plugin for adding Testimonials to your Genesis Theme, using a shortcode or a widget.
    6  * Version: 1.3
     6 * Version: 1.4
    77 * Author: Frank Schrijvers, WPStudio
    88 * Author URI: http://www.wpstud.io
  • wpstudio-testimonial-slider/trunk/inc/gts-frontend.php

    r1978852 r2089782  
    3131 * Opening Markup.
    3232 */
    33 function gts_markup_open() {
     33if ( ! function_exists( 'gts_markup_open' ) ) {
     34    function gts_markup_open() {
    3435
    35     echo '<li itemprop="review" itemscope itemtype="http://schema.org/Review">';
     36        echo '<li>';
    3637
     38    }
    3739}
    3840
     
    4042 * Testimonial Image Top.
    4143 */
    42 function gts_image_top() {
     44if ( ! function_exists( 'gts_image_top' ) ) {
     45    function gts_image_top() {
    4346
    44     if ( genesis_get_option( 'gts_image', 'gts-settings' ) != 'bottom' && has_post_thumbnail() ) {
     47        if ( genesis_get_option( 'gts_image', 'gts-settings' ) != 'bottom' && has_post_thumbnail() ) {
    4548
    46         echo the_post_thumbnail( 'gts-thumbnail' );
     49            echo the_post_thumbnail( 'gts-thumbnail' );
    4750
     51        }
    4852    }
    4953}
     
    5256 * Testimonial Rating.
    5357 */
    54 function gts_rating() {
     58if ( ! function_exists( 'gts_rating' ) ) {
     59    function gts_rating() {
    5560
    56     $rating = get_post_meta( get_the_ID(), '_gts_rating', true );
     61        $rating = get_post_meta( get_the_ID(), '_gts_rating', true );
    5762
    58     if ( ! empty( $rating ) ) {
     63        if ( ! empty( $rating ) ) {
    5964
    60         echo '<div class="gts-rating">';
    61         echo sprintf( '<span class="screen-reader-text" itemprop="reviewRating">%s</span>', $rating );
     65            echo '<div class="gts-rating">';
     66            echo sprintf( '<span class="screen-reader-text">%s</span>', $rating );
    6267
    63         // Loop through rating number and display star.
    64         for ( $i = 0; $i < $rating; $i++ ) {
    65             echo '<span class="star"></span>';
     68            // Loop through rating number and display star.
     69            for ( $i = 0; $i < $rating; $i++ ) {
     70                echo '<span class="star"></span>';
     71            }
     72
     73            echo '</div>';
    6674        }
    6775
    68         echo '</div>';
    6976    }
    70 
    7177}
    7278
     
    7480 * Testimonial Content.
    7581 */
    76 function gts_content() {
     82if ( ! function_exists( 'gts_content' ) ) {
     83    function gts_content() {
    7784
    78     echo '<blockquote itemprop="reviewBody">' . get_the_content() . '</blockquote>';
     85        echo '<blockquote>' . get_the_content() . '</blockquote>';
    7986
     87    }
    8088}
    8189
     
    8391 * Testimonial Title.
    8492 */
    85 function gts_title() {
     93if ( ! function_exists( 'gts_title' ) ) {
     94    function gts_title() {
    8695
    87     echo '<h5 itemprop="author">' . get_the_title() . '</h5>';
     96        echo '<h5>' . get_the_title() . '</h5>';
    8897
     98    }
    8999}
    90100
     
    92102 * Testimonial Image Bottom.
    93103 */
    94 function gts_image_bottom() {
     104if ( ! function_exists( 'gts_image_bottom' ) ) {
     105    function gts_image_bottom() {
    95106
    96     if ( genesis_get_option( 'gts_image', 'gts-settings' ) === 'bottom' && has_post_thumbnail() ) {
     107        if ( genesis_get_option( 'gts_image', 'gts-settings' ) === 'bottom' && has_post_thumbnail() ) {
    97108
    98         echo the_post_thumbnail( 'gts-thumbnail' );
     109            echo the_post_thumbnail( 'gts-thumbnail' );
    99110
     111        }
    100112    }
    101113}
     
    104116 * Testimonial Company.
    105117 */
    106 function gts_company() {
     118if ( ! function_exists( 'gts_company' ) ) {
     119    function gts_company() {
    107120
    108     $company = '<span class="gts-company">' . get_post_meta( get_the_ID(), '_gts_company', true ) . '</span>';
     121        $company = '<span class="gts-company">' . get_post_meta( get_the_ID(), '_gts_company', true ) . '</span>';
    109122
    110     if ( ! empty( $company ) ) {
     123        if ( ! empty( $company ) ) {
    111124
    112         echo $company;
     125            echo $company;
    113126
     127        }
    114128    }
    115129}
     
    119133 * Closing Markup.
    120134 */
    121 function gts_markup_close() {
     135if ( ! function_exists( 'gts_markup_close' ) ) {
     136    function gts_markup_close() {
    122137
    123     echo '</li>';
     138        echo '</li>';
    124139
     140    }
    125141}
    126142
  • wpstudio-testimonial-slider/trunk/readme.md

    r1978852 r2089782  
    44* Tags: testimonials, testimonial, testimonials plugin, widget, genesis, slider, Genesis Framework, genesiswp
    55* Requires at least: 3.6
    6 * Tested up to: 5.0
    7 * Stable tag: 1.3
     6* Tested up to: 5.2
     7* Stable tag: 1.4
    88* License: GPLv2 or later
    99* License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6060
    6161## Changelog
     62
     63**1.4**
     64- Tweak: removed Structured Data. Testimonials are used in many diffrent ways. The structured data is a limitation here.
     65- Bug fix: fixed Fatal error when shortcode and widget are used on same page.
    6266
    6367**1.3**
  • wpstudio-testimonial-slider/trunk/readme.txt

    r1978852 r2089782  
    33Tags: testimonials, testimonial, testimonials plugin, widget, genesis, slider, Genesis Framework, genesiswp
    44Requires at least: 3.6
    5 Tested up to: 5.0
    6 Stable tag: 1.3
     5Tested up to: 5.2
     6Stable tag: 1.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6060== Changelog ==
    6161
     62= 1.4 =
     63* Tweak: removed Structured Data. Testimonials are used in many diffrent ways. The structured data is a limitation here.
     64* Bug fix: fixed Fatal error when shortcode and widget are used on same page.
     65
    6266= 1.3 =
    6367* New: Add option to show testimonials in random order.
Note: See TracChangeset for help on using the changeset viewer.