不幸的是,当用户从WordPress 3更新到4.4时,我的插件现在停止工作,该插件帮助将JWplayer HTML5播放器嵌入带有短代码的帖子中,因此在进行新的更新时,短代码不会输出视频播放器,而只会输出短代码
[jwplayer7sc file=”https://www.youtube.com/watch?v=c74KCFIaRIw” title=”efzef” description=”zef” image=”zefzef”]
Run Code Online (Sandbox Code Playgroud)
你可以在这里看到问题
这是我的代码:
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 …
Run Code Online (Sandbox Code Playgroud) 我有以下代码,例如:
[UIView animateWithDuration:10 animations:^{
} completion:^(BOOL finished) {
}]
Run Code Online (Sandbox Code Playgroud)
当我对其应用 clang-format 时,它变成:
[UIView animateWithDuration:10 animations:^{
}
completion:^(BOOL finished){
}];
Run Code Online (Sandbox Code Playgroud)
如您所见,新行中的第二个块参数。
我的风格 :
AlignTrailingComments: true
BasedOnStyle: Chromium
BreakBeforeBraces: Allman
ColumnLimit: 0
IndentWidth: 4
TabWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
SpacesInSquareBrackets: false
SpacesInContainerLiterals: false
#SpaceInEmptyParentheses: true
SpacesInParentheses: false
UseTab: Never
KeepEmptyLinesAtTheStartOfBlocks: false
#SpaceAfterCStyleCast: true
Run Code Online (Sandbox Code Playgroud)