Changeset 1924059
- Timestamp:
- 08/13/2018 12:19:50 PM (8 years ago)
- Location:
- fg-testimonials/trunk
- Files:
-
- 6 edited
-
css/fg-testimonial.css (modified) (3 diffs)
-
fg-testimonial.php (modified) (2 diffs)
-
include/fg-testimonial-meta.php (modified) (6 diffs)
-
include/fg-testimonial-shortcode.php (modified) (5 diffs)
-
js/fg-testimonial.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fg-testimonials/trunk/css/fg-testimonial.css
r1922194 r1924059 10 10 padding: 40px 30px; 11 11 } 12 13 12 .fgts-text { 14 13 font-family: 'Roboto', sans-serif; … … 21 20 color: #394d57; 22 21 } 23 24 22 .testimonial-slider .fgts-image-holder img { 25 23 width: 100px; … … 123 121 padding-left: 15px; 124 122 } 123 .owl-carousel .owl-stage-outer { width: 100%; } 125 124 126 125 @media only screen and (max-width: 480px){ -
fg-testimonials/trunk/fg-testimonial.php
r1922272 r1924059 3 3 Plugin Name: FG Testimonials 4 4 Description: FG Testimonials 5 Version: 1.5. 15 Version: 1.5.2 6 6 Author: FuduGo 7 7 Author URI: http://fudugo.com/ … … 30 30 add_action( 'wp_enqueue_scripts', array($this, 'fgts_add_script_style' ), 10 ); 31 31 } 32 33 32 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. 35 34 } 36 35 -
fg-testimonials/trunk/include/fg-testimonial-meta.php
r1922194 r1924059 3 3 class fgtsTestimonialsMetaBox{ 4 4 5 function __construct(){ 6 7 //setup a media 8 add_action('wp_enqueue_scripts', array($this, 'fgts_add_media_upload_scripts' ) ); 5 function __construct(){ 9 6 10 7 //add meta box to custom post type … … 13 10 //save meta box to custom post type 14 11 add_action( 'save_post', array($this, 'fgts_save_testimonial_meta' ) ); 15 }16 17 18 function fgts_add_media_upload_scripts() {19 wp_enqueue_media();20 12 } 21 13 … … 37 29 global $post; 38 30 $fgts_meta = get_post_meta( $post->ID, 'fgts_testimonial_fields', true ); 31 39 32 ?> 40 33 … … 42 35 43 36 <!-- 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 50 38 <p> 51 39 <label for="fgts_testimonial_fields[designation]"><?php _e( 'Designation', 'fg-testimonials' ); ?></label> … … 53 41 <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'] ); } ?>"> 54 42 </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 62 44 <?php } 63 45 … … 74 56 return $post_id; 75 57 } 76 // check permissions 58 // check permissions 77 59 if (isset($_POST['post_type'])) { //Fix 2 78 60 if ( 'page' === $_POST['post_type'] ) { -
fg-testimonials/trunk/include/fg-testimonial-shortcode.php
r1922259 r1924059 3 3 class fgtsTestimonialsShortcode{ 4 4 5 function __construct(){ 6 5 function __construct(){ 7 6 add_shortcode( 'fgts_testimonials', array($this, 'fgts_testimonial_func' )); 8 9 7 } 10 8 11 9 function fgts_testimonial_func(){ 12 10 ob_start(); 13 11 $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">'; 16 13 17 14 $fgts_numofposts = get_option('fgts_numofposts'); … … 49 46 </div>'; 50 47 } 51 } 52 53 if(isset($fgts_meta['personname']) && !empty($fgts_meta['personname'])){ 54 48 } 49 if(!empty(trim( get_the_title() ) ) ){ 55 50 $fgts_content .='<div class="fgts-personname"> 56 <h5>'.esc_ html( $fgts_meta['personname']).'</h5>51 <h5>'.esc_attr(get_the_title()).'</h5> 57 52 </div>'; 58 53 } … … 67 62 } 68 63 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()).' 72 66 </div>'; 73 67 } … … 78 72 endwhile; endif; wp_reset_postdata(); 79 73 $fgts_content .= '</div>'; 74 if ( $fgts_wp_query->have_posts() ){ 80 75 $fgts_viewbtn = get_option('fgts_viewbtn'); 81 76 $fgts_viewbtn_link = get_option('fgts_viewbtn_link'); … … 85 80 </div>'; 86 81 } 82 } 87 83 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 } 92 88 93 89 } -
fg-testimonials/trunk/js/fg-testimonial.js
r1922259 r1924059 5 5 var fgts_obj_arr = $.isEmptyObject( fgts_obj_settings ) ? '' : fgts_obj_settings; 6 6 7 var owl = $(' #fgts-testimonials-slider');7 var owl = $('.fgts-testimonials-slider'); 8 8 owl.owlCarousel({ 9 9 loop:fgts_obj_arr.loop_setting, -
fg-testimonials/trunk/readme.txt
r1922272 r1924059 2 2 Plugin Name: FG Testimonials 3 3 Description: FG Testimonials 4 Version: 1.5. 14 Version: 1.5.2 5 5 Author: FuduGo 6 6 Author URI: http://fudugo.com/
Note: See TracChangeset
for help on using the changeset viewer.