Plugin Directory

Changeset 1924059


Ignore:
Timestamp:
08/13/2018 12:19:50 PM (8 years ago)
Author:
priyankawp
Message:

updated file for new version

Location:
fg-testimonials/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • fg-testimonials/trunk/css/fg-testimonial.css

    r1922194 r1924059  
    1010    padding: 40px 30px;
    1111}
    12 
    1312.fgts-text {
    1413    font-family: 'Roboto', sans-serif;
     
    2120    color: #394d57;
    2221}
    23 
    2422.testimonial-slider .fgts-image-holder img {
    2523    width: 100px;
     
    123121    padding-left: 15px;
    124122}
     123.owl-carousel .owl-stage-outer { width: 100%; }
    125124
    126125@media only screen and (max-width: 480px){
  • fg-testimonials/trunk/fg-testimonial.php

    r1922272 r1924059  
    33Plugin Name: FG Testimonials
    44Description: FG Testimonials
    5 Version: 1.5.1
     5Version: 1.5.2
    66Author: FuduGo
    77Author URI: http://fudugo.com/
     
    3030            add_action( 'wp_enqueue_scripts', array($this, 'fgts_add_script_style' ), 10 );
    3131        }
    32 
    3332        add_action('admin_enqueue_scripts', array($this, 'fgts_admin_style' ));
    34 
     33        add_filter( 'widget_text', 'do_shortcode' ); // to work shortcode in custom html widget.
    3534    }
    3635   
  • fg-testimonials/trunk/include/fg-testimonial-meta.php

    r1922194 r1924059  
    33class fgtsTestimonialsMetaBox{
    44
    5     function __construct(){
    6 
    7         //setup a media
    8         add_action('wp_enqueue_scripts', array($this, 'fgts_add_media_upload_scripts' ) );
     5    function __construct(){         
    96       
    107        //add meta box to custom post type
     
    1310        //save meta box to custom post type
    1411        add_action( 'save_post', array($this, 'fgts_save_testimonial_meta' ) );
    15     }
    16 
    17 
    18     function fgts_add_media_upload_scripts() {   
    19         wp_enqueue_media();
    2012    }
    2113
     
    3729        global $post; 
    3830        $fgts_meta = get_post_meta( $post->ID, 'fgts_testimonial_fields', true );
     31
    3932        ?>
    4033
     
    4235
    4336        <!-- All fields will go here -->
    44         <p>
    45             <label for="fgts_testimonial_fields[personname]"><?php _e( 'Person Name', 'fg-testimonials' ); ?></label>
    46             <br>           
    47             <input type="text" name="fgts_testimonial_fields[personname]" id="fgts_testimonial_fields[personname]" class="regular-text" value="<?php if (is_array($fgts_meta) && isset($fgts_meta['personname'])) { echo esc_html( $fgts_meta['personname'] ); } ?>">
    48         </p>
    49 
     37       
    5038        <p>
    5139            <label for="fgts_testimonial_fields[designation]"><?php _e( 'Designation', 'fg-testimonials' ); ?></label>
     
    5341            <input type="text" name="fgts_testimonial_fields[designation]" id="fgts_testimonial_fields[designation]" class="regular-text" value="<?php if (is_array($fgts_meta) && isset($fgts_meta['designation'])) { echo esc_html( $fgts_meta['designation'] ); } ?>">
    5442        </p>
    55 
    56         <p>
    57             <label for="fgts_testimonial_fields[description]"><?php _e( 'Short Description', 'fg-testimonials' ); ?></label>
    58             <br>
    59             <textarea name="fgts_testimonial_fields[description]" id="fgts_testimonial_fields[description]" rows="5" cols="30" style="width:500px;"><?php if (is_array($fgts_meta) && isset($fgts_meta['description'])) {   echo esc_html( $fgts_meta['description'] ) ; } ?></textarea>
    60         </p>       
    61      
     43       
    6244    <?php }
    6345
     
    7456            return $post_id;
    7557        }
    76         // check permissions
     58        // check permissions       
    7759        if (isset($_POST['post_type'])) { //Fix 2
    7860            if ( 'page' === $_POST['post_type'] ) {
  • fg-testimonials/trunk/include/fg-testimonial-shortcode.php

    r1922259 r1924059  
    33class fgtsTestimonialsShortcode{
    44
    5     function __construct(){
    6        
     5    function __construct(){     
    76        add_shortcode( 'fgts_testimonials', array($this, 'fgts_testimonial_func' ));
    8 
    97    }
    108
    119    function fgts_testimonial_func(){
    12        
     10        ob_start();     
    1311        $fgts_content = '';
    14 
    15         $fgts_content .= '<div id="fgts-testimonials-slider" class="owl-carousel owl-theme">';
     12        $fgts_content .= '<div id="fgts-testimonials-slider" class="fgts-testimonials-slider owl-carousel owl-theme">';
    1613
    1714        $fgts_numofposts = get_option('fgts_numofposts');
     
    4946                        </div>';
    5047                         }
    51                         }                       
    52 
    53                         if(isset($fgts_meta['personname']) && !empty($fgts_meta['personname'])){
    54 
     48                        }
     49                        if(!empty(trim( get_the_title() ) ) ){
    5550        $fgts_content .='<div class="fgts-personname">
    56                             <h5>'.esc_html( $fgts_meta['personname'] ).'</h5>
     51                            <h5>'.esc_attr(get_the_title()).'</h5>
    5752                        </div>';
    5853                        }
     
    6762                        }
    6863
    69                         if(isset($fgts_meta['description']) && !empty($fgts_meta['description'])){
    70         $fgts_content .= '<div class="fgts-text">
    71                             <p>'.esc_html( $fgts_meta['description'] ).'</p>
     64                        if(!empty(get_the_content() ) ){
     65        $fgts_content .= '<div class="fgts-text">'.esc_attr(get_the_content()).'
    7266                        </div>';
    7367                        }
     
    7872            endwhile; endif; wp_reset_postdata();
    7973    $fgts_content .= '</div>';
     74                      if ( $fgts_wp_query->have_posts() ){
    8075                      $fgts_viewbtn = get_option('fgts_viewbtn');
    8176                      $fgts_viewbtn_link = get_option('fgts_viewbtn_link');
     
    8580                      </div>';
    8681                    }
     82                }
    8783
    88             return '<div class="fgts_slider_wrap">'.$fgts_content.'</div>';
    89             ?>
    90        
    91     <?php }     
     84            return '<div class="fgts_slider_wrap">'.$fgts_content.'</div>';         
     85    ob_flush();
     86
     87    }   
    9288
    9389}
  • fg-testimonials/trunk/js/fg-testimonial.js

    r1922259 r1924059  
    55  var fgts_obj_arr = $.isEmptyObject( fgts_obj_settings ) ? '' : fgts_obj_settings;
    66
    7   var owl = $('#fgts-testimonials-slider'); 
     7  var owl = $('.fgts-testimonials-slider'); 
    88  owl.owlCarousel({
    99      loop:fgts_obj_arr.loop_setting,
  • fg-testimonials/trunk/readme.txt

    r1922272 r1924059  
    22Plugin Name: FG Testimonials
    33Description: FG Testimonials
    4 Version: 1.5.1
     4Version: 1.5.2
    55Author: FuduGo
    66Author URI: http://fudugo.com/
Note: See TracChangeset for help on using the changeset viewer.