WordPress 4.4短代码纹理化问题

时间:2015-12-17 20:18:28

标签: php html5 wordpress

可悲的是,当用户从WordPress 3更新到4.4时,我的插件现在停止工作,该插件有助于在带有短代码的帖子上嵌入JWplayer HTML5播放器,因此使用新的更新时,短代码不会输出视频播放器,只需输入短代码

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;
          }

您可以看到问题here

这是我的代码:

TEST 1

jw7sc_player(shortcode params ........)函数返回视频播放器

0 个答案:

没有答案