Plugin Directory

Changeset 1823311


Ignore:
Timestamp:
02/16/2018 10:44:57 AM (8 years ago)
Author:
techadminsmilingvideo
Message:

1.1.7 plugin permission fix

Location:
smiling-video/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smiling-video/trunk/readme.txt

    r1822779 r1823311  
    55Requires PHP: 5.6
    66Tested up to: 4.9
    7 Stable tag: 1.1.6
     7Stable tag: 1.1.7
    88License: GPL v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9999== Changelog ==
    100100
     101= 1.1.7 =
     102 * plugin permission fix
     103
    101104= 1.1.5 =
    102105 * restored video-js lib
  • smiling-video/trunk/smiling_video.php

    r1822779 r1823311  
    88Description: Smiling.Video offers a video player and gallery with a wide catalogue of premium videos proposed by leading Content Providers of all sectors: news, sport, movie and tv series, cinema, etc
    99Videos are continuously updated in many languages: italian, english, spanish, french
    10 Version: 1.1.6
     10Version: 1.1.7
    1111Author: Smiling.video
    1212Author URI: http://smiling.video/
     
    5555        // See if the user has posted us some information
    5656        // If they did, this hidden field will be set to 'Y'
    57         if ( ! empty( $_POST ) && check_admin_referer( 'smiling_video_usersettings', 'smiling_video_usersettings_nonce' ) ) {
    58             // process form data
    59             if( isset($_POST['smiling_video_hidden']) && sanitize_text_field($_POST[ 'smiling_video_hidden' ]) == 'Y' ) {
     57        if( ! empty( $_POST ) && isset($_POST[ 'smiling_video_hidden' ]) && sanitize_text_field($_POST[ 'smiling_video_hidden' ]) == 'Y' ) {
     58            //if nonce is okay we can process user data
     59            if ( check_admin_referer( 'smiling_video_usersettings', 'smiling_video_usersettings_nonce' ) ) {
    6060                // Read their posted value
    6161                $opt_user = sanitize_text_field($_POST[ 'smiling_video_user' ]);
     
    114114    if ( current_user_can( 'publish_posts' ) )  {
    115115       
    116         if ( ! empty( $_POST ) && check_admin_referer( 'smiling_video_usersettings', 'smiling_video_usersettings_nonce' ) ) {
    117             if( isset($_POST[ 'smiling_video_hidden' ]) && sanitize_text_field($_POST[ 'smiling_video_hidden' ]) == 'Y' ) {
     116        // See if the user has posted us some information on smiling_video form
     117        // If they did, this hidden field will be set to 'Y'
     118        if( ! empty( $_POST ) && isset($_POST[ 'smiling_video_hidden' ]) && sanitize_text_field($_POST[ 'smiling_video_hidden' ]) == 'Y' ) {
     119            //if nonce is okay we can process user data
     120            if ( check_admin_referer( 'smiling_video_usersettings', 'smiling_video_usersettings_nonce' ) ) {
    118121                $user = sanitize_text_field($_POST[ 'smiling_video_user' ]);
    119122                $pass = sanitize_text_field($_POST[ 'smiling_video_password' ]);
     
    145148}
    146149function smiling_video_add_css() {
    147     wp_register_style( 'smiling_video_style', plugins_url('css/smiling_video.css?smver=1.1.6', __FILE__));
    148     wp_register_style( 'smiling_video_csscore', plugins_url('css/video-js-5.19.2.css?smver=1.1.6', __FILE__));
     150    wp_register_style( 'smiling_video_style', plugins_url('css/smiling_video.css?smver=1.1.7', __FILE__));
     151    wp_register_style( 'smiling_video_csscore', plugins_url('css/video-js-5.19.2.css?smver=1.1.7', __FILE__));
    149152    wp_enqueue_style('smiling_video_style');
    150153    wp_enqueue_style('smiling_video_csscore');
    151154}
    152155function smiling_video_add_js() {
    153     wp_register_script( 'smiling_video_script', plugins_url('js/smiling_video.js?smver=1.1.6', __FILE__), array( 'jquery' ) );
    154     wp_register_script( 'smiling_video_script_4hls', plugins_url('js/video-js-5.19.2.js?smver=1.1.6', __FILE__));
     156    wp_register_script( 'smiling_video_script', plugins_url('js/smiling_video.js?smver=1.1.7', __FILE__), array( 'jquery' ) );
     157    wp_register_script( 'smiling_video_script_4hls', plugins_url('js/video-js-5.19.2.js?smver=1.1.7', __FILE__));
    155158    wp_register_script( 'smiling_video_script_hls_min', plugins_url('js/videojs-contrib-hls.min.js', __FILE__));
    156159    wp_enqueue_script('smiling_video_script');
     
    536539
    537540function smiling_video_enqueue_style() {
    538     wp_enqueue_style( 'smiling_video_csscore', plugins_url('css/video-js-5.19.2.css?smver=1.1.6', __FILE__), false );
    539     wp_enqueue_style( 'smiling_video_cssima', plugins_url('css/videojs.ima.css?smver=1.1.6', __FILE__), false );
    540     wp_enqueue_style( 'smiling_video_cssskin', plugins_url('css/skin-smiling-player-multicp-2.0.css?smver=1.1.6', __FILE__), false );
     541    wp_enqueue_style( 'smiling_video_csscore', plugins_url('css/video-js-5.19.2.css?smver=1.1.7', __FILE__), false );
     542    wp_enqueue_style( 'smiling_video_cssima', plugins_url('css/videojs.ima.css?smver=1.1.7', __FILE__), false );
     543    wp_enqueue_style( 'smiling_video_cssskin', plugins_url('css/skin-smiling-player-multicp-2.0.css?smver=1.1.7', __FILE__), false );
    541544    wp_enqueue_style( 'smiling_video_cssgoogleapisfont', plugins_url('css/Quicksand.css', __FILE__), false );
    542545}
    543546
    544547function smiling_video_enqueue_script() {
    545     wp_enqueue_script( 'smiling_video_jscommon', plugins_url('js/sm-common-func.js?smver=1.1.6', __FILE__), false );
     548    wp_enqueue_script( 'smiling_video_jscommon', plugins_url('js/sm-common-func.js?smver=1.1.7', __FILE__), false );
    546549}
    547550
Note: See TracChangeset for help on using the changeset viewer.