Plugin Directory

Changeset 2208537


Ignore:
Timestamp:
12/09/2019 12:02:46 PM (6 years ago)
Author:
primisdigital
Message:

Releasing 1.3

Location:
simple-featured-video
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • simple-featured-video/tags/1.1/readme.txt

    r2170952 r2208537  
    55version :1.1
    66Author: Prims digital
    7 Tags:videos,featured video,woocommerce video,product-video,video embed,video plugin,video post,posts featured video
     7Tags:featured,video,videos,featured video,woocommerce video,product-video,video embed,video plugin,video post,posts featured video
    88Requires at least: any version
    9 Tested up to: 5.2.3
     9Tested up to: 5.2.4
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • simple-featured-video/trunk/lib/sfv-settings.php

    r2169426 r2208537  
    1515            $sfv_post_type=$_POST['sfv_post_type'];
    1616            $sfv_after_contents=$_POST['sfv_after_contents'];
     17            $sfv_replace_thumbnail=$_POST['sfv_replace_thumbnail'];
    1718            $sfv_after_excerpt=$_POST['sfv_after_excerpt'];
    1819            $sfv_woocommerce_option=$_POST['sfv_woocommerce_option'];
     
    4748                add_option( $option_name, $new_value, $deprecated, $autoload );
    4849            }
    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            }
    5062           
    5163            // after excerpt
     
    129141    <p>
    130142   
     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   
    131149    <?php $sfv_after_excerpt = get_option('sfv_after_excerpt'); ?>
    132150        <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  
    44 * Plugin URI:  https://www.primisdigital.com/
    55 * Description: Featured Video uploading for wordpress posts,pages, woocommerce products,  and custom post type
    6  * Version:     1.1
     6 * Version:     1.2
    77 * Author:      Primis Digital
    88 * Author URI:  https://www.primisdigital.com/
     
    206206    return $content;
    207207}
    208 
    209208//woocommerce part
    210209if ( get_option( 'sfv_woocommerce_option' )) {
     
    250249
    251250}
     251
     252// add instead of post thumbnail
     253$sfv_replace_thumbnail = get_option('sfv_replace_thumbnail');
     254if($sfv_replace_thumbnail == "true"){
     255add_filter('post_thumbnail_html', 'filter_post_thumbnail_html', 10, 5 );
     256}
     257// define the post_thumbnail_html callback
     258function 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.