当前位置:  开发笔记 > 编程语言 > 正文

WordPress 4.4简码纹理化问题

如何解决《WordPress4.4简码纹理化问题》经验,为你挑选了0个好方法。

不幸的是,当用户从WordPress 3更新到4.4时,我的插件现在停止工作,该插件帮助将JWplayer HTML5播放器嵌入带有短代码的帖子中,因此在进行新的更新时,短代码不会输出视频播放器,而只会输出短代码

[jwplayer7sc file=”https://www.youtube.com/watch?v=c74KCFIaRIw” title=”efzef” description=”zef” image=”zefzef”]

你可以在这里看到问题

这是我的代码:

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 ........)函数返回视频播放器

推荐阅读
乐韵答题
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有