Changeset 2208537
- Timestamp:
- 12/09/2019 12:02:46 PM (6 years ago)
- Location:
- simple-featured-video
- Files:
-
- 3 edited
-
tags/1.1/readme.txt (modified) (1 diff)
-
trunk/lib/sfv-settings.php (modified) (3 diffs)
-
trunk/simple-featured-video.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-featured-video/tags/1.1/readme.txt
r2170952 r2208537 5 5 version :1.1 6 6 Author: Prims digital 7 Tags: videos,featured video,woocommerce video,product-video,video embed,video plugin,video post,posts featured video7 Tags:featured,video,videos,featured video,woocommerce video,product-video,video embed,video plugin,video post,posts featured video 8 8 Requires at least: any version 9 Tested up to: 5.2. 39 Tested up to: 5.2.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
simple-featured-video/trunk/lib/sfv-settings.php
r2169426 r2208537 15 15 $sfv_post_type=$_POST['sfv_post_type']; 16 16 $sfv_after_contents=$_POST['sfv_after_contents']; 17 $sfv_replace_thumbnail=$_POST['sfv_replace_thumbnail']; 17 18 $sfv_after_excerpt=$_POST['sfv_after_excerpt']; 18 19 $sfv_woocommerce_option=$_POST['sfv_woocommerce_option']; … … 47 48 add_option( $option_name, $new_value, $deprecated, $autoload ); 48 49 } 49 50 // instead of thumbnail 51 $option_name = 'sfv_replace_thumbnail' ; 52 $new_value = $sfv_replace_thumbnail; 53 if ( get_option( $option_name ) !== false ) { 54 // The option already exists, so update it. 55 update_option( $option_name, $new_value ); 56 } else { 57 // The option hasn't been created yet, so add it with $autoload set to 'no'. 58 $deprecated = null; 59 $autoload = 'no'; 60 add_option( $option_name, $new_value, $deprecated, $autoload ); 61 } 50 62 51 63 // after excerpt … … 129 141 <p> 130 142 143 <?php $sfv_replace_thumbnail = get_option('sfv_replace_thumbnail'); ?> 144 <input type="checkbox" id="sfv_replace_thumbnail" value="true" name="sfv_replace_thumbnail" <?php if($sfv_replace_thumbnail == "true") echo "checked"; ?>> 145 <label for="sfv_replace_thumbnail">Automatically display video instaed of posts thumbnail? </label> 146 </p> 147 <p> 148 131 149 <?php $sfv_after_excerpt = get_option('sfv_after_excerpt'); ?> 132 150 <input type="checkbox" id="sfv_after_excerpt" value="true" name="sfv_after_excerpt" <?php if($sfv_after_excerpt == "true") echo "checked"; ?>> -
simple-featured-video/trunk/simple-featured-video.php
r2169433 r2208537 4 4 * Plugin URI: https://www.primisdigital.com/ 5 5 * Description: Featured Video uploading for wordpress posts,pages, woocommerce products, and custom post type 6 * Version: 1. 16 * Version: 1.2 7 7 * Author: Primis Digital 8 8 * Author URI: https://www.primisdigital.com/ … … 206 206 return $content; 207 207 } 208 209 208 //woocommerce part 210 209 if ( get_option( 'sfv_woocommerce_option' )) { … … 250 249 251 250 } 251 252 // add instead of post thumbnail 253 $sfv_replace_thumbnail = get_option('sfv_replace_thumbnail'); 254 if($sfv_replace_thumbnail == "true"){ 255 add_filter('post_thumbnail_html', 'filter_post_thumbnail_html', 10, 5 ); 256 } 257 // define the post_thumbnail_html callback 258 function filter_post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) { 259 $meta_key = 'featured_video_uploading'; 260 $meta_ket = get_post_meta($post_id, $meta_key, true); 261 if($meta_ket){ 262 $sfv_vid_woo = '<div style="clear:both">'.do_shortcode("[sfv_video_show]").'</div>'; 263 return $sfv_vid_woo; 264 } 265 return $html; 266 };
Note: See TracChangeset
for help on using the changeset viewer.