Sadly, my plugin stop working now when users update from WordPress 3 to 4.4, the plugin help to embed JWplayer HTML5 player on posts with shortcodes, so with new update the shortcodes not output the video player, just the shortcode code
[jwplayer7sc file=âhttps://www.youtube.com/watch?v=c74KCFIaRIwâ title=âefzefâ description=âzefâ image=âzefzefâ]
You can see the problem here
This is my code:
function jw7sc_video_shortcode($atts) {
// extract all video shortcode parameters and pass them to @VARS
extract( shortcode_atts( array(
'id' => generateRandomString(),
'file' => '',
'title' => '',
'description' => '',
'image' => '',
'width' => '',
'height' => '',
'autostart' => '',
'mute' => '',
'controls' => '',
'repeat' => '' ,
'displaytitle' => '',
'displaydescription' => '',
'androidhls' => '',
'stretching' => '',
'skin' => ''
), $atts ) );
// check if options not yet configured
if(!is_bool(jw7sc_options())){
extract(jw7sc_options());
}
else {
// if options not configured yet show message
return('to show the video player Please Edit Jwplater 7 Settings First from admin menu ( Settings > Jwplayer 7 shortcode ) ');
}
return jw7sc_player(
$shortcode_width = $width, // custom shortcode width return (integer)
$shortcode_height = $height, // custom shortcode height (integer)
$shortcode_autostart = $autostart, // custom shortcode ausotart mode return (bool)
$shortcode_mute = $mute, // custom shortcode mute mode return (bool)
$shortcode_controls = $controls, // custom shortcode controls mode return (bool)
$shortcode_repeat = $repeat, //custom shortcode repeat mode return (bool)
$shortcode_displaytitle = $displaytitle,
$shortcode_displaydescription = $displaydescription,
$shortcode_androidhls = $androidhls,
$shortcode_stretching = $stretching,
$shortcode_skin = $skin,
$jw7sc_media_type = 'file',
$jw7sc_playlist = false, // check if media contains playlist ids
$jw7vid_player_size = $jw7sc_player_size,
$jw7video_title = $title, // media title
$jw7video_description = $description, // media description
$jw7vid_width = $jw7sc_fixed_width, //fixed player width
$jw7vid_height = $jw7sc_fixed_height, //fixed player height
$jw_player_id = $id, // custom random player id return (rand() number)
$jw7_playable_source = $file, // get playable media source
$jw7sc_license_key, // options license key retun (string)
$jw7sc_player_logo, // get player logo return (string)
$jw7_video_image = $image, // get video image return (string)
$usecustomskinActive = $jw7sc_use_custom_skin, // if custom skin check box checked
$jw7sc_select_skin, // selected skin
$jw7sc_active_color_skin, // get custom active skin color
$jw7sc_inactive_color_skin, // get custom inactive skin color
$jw7sc_bg_color_skin, // get custom background skin color
$jw7sc_stretching_mode, // get stretching mode
$jw7sc_aboutlink_mode, // aboutlink mode
$jw7sc_abouttext_mode, // abouttext mode
$jw7sc_displaytitle_mode, // displaytitle mode return (bool)
$jw7sc_displaydescription_mode, //displaydescription mode return (bool)
$jw7sc_playlist_mode,
$jw7sc_sharing_mode, // share mode
$jw7sc_share_heading, // share heading return (string)
$jw7sc_android_mode, //androidhls mode return (bool)
$jw7sc_repeat_mode, // repeat mode return (bool)
$jw7sc_render_mode, // render mode
$jw7sc_mute_mode, // mute mode return (bool)
$jw7sc_autostart_mode, // autostart mode return (bool)
$jw7sc_controls_mode, // show controls or hide return (bool)
$jw7sc_preroll_client_ad,
$jw7sc_preroll_tag_ad,
$jw7sc_preroll_skipoffset_ad, // skipoffset retun (integer) default value = 5 / (seconds)
$jw7sc_preroll_skipmsg_ad, // skipmsg return (string)
$jw7sc_preroll_skiptext_ad // skiptext return (string)
);
}
// apply our jwplayer7sc shortcode
add_shortcode('jwplayer7sc' , 'jw7sc_video_shortcode');
add_filter( 'no_texturize_shortcodes', 'no_texturize_shortcodes_example' );
function no_texturize_shortcodes_example( $shortcodes ) {
$shortcodes[] = 'jwplayer7sc';
return $shortcodes;
}
jw7sc_player(shortcode params……..) function return video player