-
Notifications
You must be signed in to change notification settings - Fork 17
Fix thumbnail not being updated issue #253 #255
base: master
Are you sure you want to change the base?
Conversation
Thumbnail is not changing from the WordPress media # issue 253
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpcs scanning turned up:
🚫 195 errors
hashes-api-scanning skipped
Posting will continue in further review(s)
admin/rt-transcoder-admin.php
Outdated
| // Video attachment ID. | ||
| $postId = (isset($post['ID']) AND !empty($post['ID'])) ? intval( sanitize_text_field($post['ID']) ) : NULL; | ||
| // Empty check for thumbnail image file name and post id | ||
| if(! $rtMediaSelectedThumbnail OR ! $postId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$postId" is not in valid snake_case format, try "$post_id" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Video attachment ID. | ||
| $postId = (isset($post['ID']) AND !empty($post['ID'])) ? intval( sanitize_text_field($post['ID']) ) : NULL; | ||
| // Empty check for thumbnail image file name and post id | ||
| if(! $rtMediaSelectedThumbnail OR ! $postId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before closing parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Video attachment ID. | ||
| $postId = (isset($post['ID']) AND !empty($post['ID'])) ? intval( sanitize_text_field($post['ID']) ) : NULL; | ||
| // Empty check for thumbnail image file name and post id | ||
| if(! $rtMediaSelectedThumbnail OR ! $postId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Video attachment ID. | ||
| $postId = (isset($post['ID']) AND !empty($post['ID'])) ? intval( sanitize_text_field($post['ID']) ) : NULL; | ||
| // Empty check for thumbnail image file name and post id | ||
| if(! $rtMediaSelectedThumbnail OR ! $postId){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| } | ||
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space after opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis).
admin/rt-transcoder-admin.php
Outdated
| } | ||
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before closing parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| } | ||
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| } | ||
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code starts] === | ||
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
admin/rt-transcoder-admin.php
Outdated
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space after open parenthesis; 0 found (Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen).
admin/rt-transcoder-admin.php
Outdated
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$rtMediaSelectedThumbnail" is not in valid snake_case format, try "$rt_media_selected_thumbnail" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // if rtMedia Plugin is exist Do this block | ||
| if (class_exists( 'rtMedia' )){ | ||
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space before close parenthesis; 0 found (Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose).
admin/rt-transcoder-admin.php
Outdated
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; | ||
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; | ||
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; | ||
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Missing space after array opener (WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener).
admin/rt-transcoder-admin.php
Outdated
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; | ||
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$postId" is not in valid snake_case format, try "$post_id" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| $uploads = function_exists('wp_get_upload_dir') ? wp_get_upload_dir() : wp_upload_dir(); | ||
| $final_file_url = (strpos($rtMediaSelectedThumbnail, $uploads['baseurl']) === false) ? $rtMediaSelectedThumbnail : $uploads['baseurl'] . '/' . $rtMediaSelectedThumbnail; | ||
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Missing space before array closer (WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
admin/rt-transcoder-admin.php
Outdated
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); | ||
| $media_id = $media[0]->id; | ||
| $rtmedia_model->update(array('cover_art' => $final_file_url ), array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); | ||
| $media_id = $media[0]->id; | ||
| $rtmedia_model->update(array('cover_art' => $final_file_url ), array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); | ||
| $media_id = $media[0]->id; | ||
| $rtmedia_model->update(array('cover_art' => $final_file_url ), array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Missing space after array opener (WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener).
admin/rt-transcoder-admin.php
Outdated
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); | ||
| $media_id = $media[0]->id; | ||
| $rtmedia_model->update(array('cover_art' => $final_file_url ), array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$postId" is not in valid snake_case format, try "$post_id" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| $rtmedia_model = new RTMediaModel(); | ||
| $media = $rtmedia_model->get(array('media_id' => $postId)); | ||
| $media_id = $media[0]->id; | ||
| $rtmedia_model->update(array('cover_art' => $final_file_url ), array('media_id' => $postId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Missing space before array closer (WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser).
admin/rt-transcoder-admin.php
Outdated
| rtt_update_activity_after_thumb_set( $media_id ); | ||
| } | ||
| // Updating post meta. | ||
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| rtt_update_activity_after_thumb_set( $media_id ); | ||
| } | ||
| // Updating post meta. | ||
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| rtt_update_activity_after_thumb_set( $media_id ); | ||
| } | ||
| // Updating post meta. | ||
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$postId" is not in valid snake_case format, try "$post_id" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| rtt_update_activity_after_thumb_set( $media_id ); | ||
| } | ||
| // Updating post meta. | ||
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$rtMediaSelectedThumbnail" is not in valid snake_case format, try "$rt_media_selected_thumbnail" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Updating post meta. | ||
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); | ||
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Perl-style comments are not allowed; use "// Comment" instead (Squiz.Commenting.InlineComment.WrongStyle).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| update_post_meta($postId, '_rt_media_video_thumbnail', $rtMediaSelectedThumbnail); | ||
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailListArray" is not in valid snake_case format, try "$thumbnail_list_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| // === This is old code [legacy code ends] === | ||
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$postId" is not in valid snake_case format, try "$post_id" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| # I am creating thumbnail entry because when transcoder sent the data it create only first thumbnail of the video | ||
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space before comment text but found 2; use block comment if you need indentation (Squiz.Commenting.InlineComment.SpacingBefore).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space after opening control structure is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space after opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space before "!"; 0 found (WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailListArray" is not in valid snake_case format, try "$thumbnail_list_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: PHP keywords must be lowercase; expected "or" but found "OR" (Generic.PHP.LowerCaseKeyword.Found).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Logical operator "or" is prohibited; use "||" instead (Squiz.Operators.ValidLogicalOperators.NotAllowed).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before closing parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Getting all meta File name that was created by this Plugin | ||
| $thumbnailListArray = get_post_meta($postId, '_rt_media_thumbnails', true); | ||
| // Check is empty or not array. | ||
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
| if(! is_array($thumbnailListArray) OR empty($thumbnailListArray)){ | ||
| return $post; | ||
| } | ||
| // Global database object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| } | ||
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space after opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailListArray" is not in valid snake_case format, try "$thumbnail_list_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$fileLastHalfPath" is not in valid snake_case format, try "$file_last_half_path" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before closing parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
admin/rt-transcoder-admin.php
Outdated
| // Global database object | ||
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
| global $wpdb; | ||
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$firstPreviousEntryID" is not in valid snake_case format, try "$first_previous_entry_i_d" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: String "SELECT * FROM " does not require double quotes; use single quotes instead (Squiz.Strings.DoubleQuoteUsage.NotRequired).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Concat operator must be surrounded by a single space (Squiz.Strings.ConcatenationSpacing.PaddingFound).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use placeholders and $wpdb->prepare(); found pathinfo (WordPress.DB.PreparedSQL.NotPrepared).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use placeholders and $wpdb->prepare(); found $fileLastHalfPath (WordPress.DB.PreparedSQL.NotPrepared).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$fileLastHalfPath" is not in valid snake_case format, try "$file_last_half_path" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
admin/rt-transcoder-admin.php
Outdated
| // Looping the thumbnails array | ||
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use placeholders and $wpdb->prepare(); found PATHINFO_FILENAME (WordPress.DB.PreparedSQL.NotPrepared).
admin/rt-transcoder-admin.php
Outdated
| foreach ($thumbnailListArray as $fileLastHalfPath){ | ||
| // Running database query to see thumbnail already exist in the database | ||
| $firstPreviousEntryID = $wpdb->get_var("SELECT * FROM ".$wpdb->prefix."posts WHERE post_type = 'attachment' AND post_title = '". pathinfo($fileLastHalfPath, PATHINFO_FILENAME) ."'"); | ||
| // if Thumbnail is not in the database than insert the thubnail to the database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
Those are style changes that were requested by rtBot
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpcs scanning turned up:
🚫 186 errors
hashes-api-scanning skipped
Posting will continue in further review(s)
| // | ||
| if ( isset( $usage_details[ $this->api_key ]->plan->name ) && ( strtolower( $usage_details[ $this->api_key ]->plan->name ) === strtolower( $name ) ) && $usage_details[ $this->api_key ]->sub_status && ! $force ) { | ||
| $form = '<button disabled="disabled" type="submit" class="button button-primary bpm-unsubscribe">' . esc_html__( 'Current Plan', 'transcoder' ) . '</button>'; | ||
| $form = '<button disabled="disabled" type="submit" class="button button-primary bpm-unsubscribe">' . esc_html__( 'Current Plan', 'transcoder' ) . '</button>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /** | ||
| * Display all video thumbnails on attachment edit page. | ||
| * | ||
| * @since 1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: There must be exactly one blank line before the tags in a doc comment (Generic.Commenting.DocComment.SpacingBeforeTags).
| * @param array $form_fields An array of attachment form fields. | ||
| * @param WP_Post $post The WP_Post attachment object. | ||
| * @return array $form_fields | ||
| * @param array $form_fields An array of attachment form fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Spaces must be used for mid-line alignment; tabs are not allowed (WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed).
| * @param WP_Post $post The WP_Post attachment object. | ||
| * @return array $form_fields | ||
| * @param array $form_fields An array of attachment form fields. | ||
| * @param WP_Post $post The WP_Post attachment object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Spaces must be used for mid-line alignment; tabs are not allowed (WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed).
| * @return array $form_fields | ||
| * @param array $form_fields An array of attachment form fields. | ||
| * @param WP_Post $post The WP_Post attachment object. | ||
| * @return array $form_fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Spaces must be used for mid-line alignment; tabs are not allowed (WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space after opening control structure is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space after opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space before "!"; 0 found (WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: PHP keywords must be lowercase; expected "or" but found "OR" (Generic.PHP.LowerCaseKeyword.Found).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Logical operator "or" is prohibited; use "||" instead (Squiz.Operators.ValidLogicalOperators.NotAllowed).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use Yoda Condition checks, you must (WordPress.PHP.YodaConditions.NotYoda).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
| } | ||
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
| public function show_video_thumbnail_in_attachment_edit_page( $form_fields, $post ) { | ||
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ | ||
| return $form_fields; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Tabs must be used to indent lines; spaces are not allowed (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed).
| // If post mime type is not video, this feature is only for videos. | ||
| if(! isset(explode( '/', $post->post_mime_type)[0]) OR explode('/', $post->post_mime_type)[0] !== 'video' ){ | ||
| return $form_fields; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Tabs must be used to indent lines; spaces are not allowed (Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed).
| return $form_fields; | ||
| } | ||
| // Getting attachment thumbnail list that was created by our Plugin. | ||
| $thumbnailArray = get_post_meta( $post->ID, '_rt_media_thumbnails', true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailArray" is not in valid snake_case format, try "$thumbnail_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| // Getting attachment thumbnail list that was created by our Plugin. | ||
| $thumbnailArray = get_post_meta( $post->ID, '_rt_media_thumbnails', true ); | ||
| // Getting option. | ||
| $thumbnailArray = empty( $thumbnailArray ) ? get_post_meta( $post->ID, 'rtmedia_media_thumbnails', true ) : $thumbnailArray; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailArray" is not in valid snake_case format, try "$thumbnail_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Getting option. | ||
| $thumbnailArray = empty( $thumbnailArray ) ? get_post_meta( $post->ID, 'rtmedia_media_thumbnails', true ) : $thumbnailArray; | ||
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$preSelectedThumbnail" is not in valid snake_case format, try "$pre_selected_thumbnail" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Getting option. | ||
| $thumbnailArray = empty( $thumbnailArray ) ? get_post_meta( $post->ID, 'rtmedia_media_thumbnails', true ) : $thumbnailArray; | ||
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
| // Getting option. | ||
| $thumbnailArray = empty( $thumbnailArray ) ? get_post_meta( $post->ID, 'rtmedia_media_thumbnails', true ) : $thumbnailArray; | ||
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
| $thumbnailArray = empty( $thumbnailArray ) ? get_post_meta( $post->ID, 'rtmedia_media_thumbnails', true ) : $thumbnailArray; | ||
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space after opening control structure is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space before opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: No space after opening parenthesis is prohibited (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after IF keyword; 0 found (Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space before "!"; 0 found (WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailArray" is not in valid snake_case format, try "$thumbnail_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: PHP keywords must be lowercase; expected "or" but found "OR" (Generic.PHP.LowerCaseKeyword.Found).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Logical operator "or" is prohibited; use "||" instead (Squiz.Operators.ValidLogicalOperators.NotAllowed).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 space(s) after closing parenthesis; found 0 (Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis).
| // Saved or selected thumbnail is that was saved in attachment option. | ||
| $preSelectedThumbnail = get_post_meta($post->ID, '_rt_media_video_thumbnail', true); | ||
| // checking thumbnail Array is array and not empty | ||
| if(! is_array( $thumbnailArray ) OR empty( $thumbnailArray ) ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Space between opening control structure and closing parenthesis is required (WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis).
| // Backward compatibility. | ||
| $uploads = function_exists( 'wp_get_upload_dir' ) ? wp_get_upload_dir() : wp_upload_dir(); | ||
| // HTML buffer holder. | ||
| $htmlString = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Backward compatibility. | ||
| $uploads = function_exists( 'wp_get_upload_dir' ) ? wp_get_upload_dir() : wp_upload_dir(); | ||
| // HTML buffer holder. | ||
| $htmlString = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Backward compatibility. | ||
| $uploads = function_exists( 'wp_get_upload_dir' ) ? wp_get_upload_dir() : wp_upload_dir(); | ||
| // HTML buffer holder. | ||
| $htmlString = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: String "" does not require double quotes; use single quotes instead (Squiz.Strings.DoubleQuoteUsage.NotRequired).
| // HTML buffer holder. | ||
| $htmlString = ""; | ||
| // Creating HTML output buffering, starts. | ||
| $htmlString .= "<ul>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // HTML buffer holder. | ||
| $htmlString = ""; | ||
| // Creating HTML output buffering, starts. | ||
| $htmlString .= "<ul>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: String "<ul>" does not require double quotes; use single quotes instead (Squiz.Strings.DoubleQuoteUsage.NotRequired).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| // Creating HTML output buffering, starts. | ||
| $htmlString .= "<ul>"; | ||
| // Looping the thumbnail array. | ||
| foreach ( $thumbnailArray as $key => $thumbnailLink ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailArray" is not in valid snake_case format, try "$thumbnail_array" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Creating HTML output buffering, starts. | ||
| $htmlString .= "<ul>"; | ||
| // Looping the thumbnail array. | ||
| foreach ( $thumbnailArray as $key => $thumbnailLink ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailLink" is not in valid snake_case format, try "$thumbnail_link" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Looping the thumbnail array. | ||
| foreach ( $thumbnailArray as $key => $thumbnailLink ) { | ||
| // Checked status. | ||
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$preSelectionStatus" is not in valid snake_case format, try "$pre_selection_status" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Looping the thumbnail array. | ||
| foreach ( $thumbnailArray as $key => $thumbnailLink ) { | ||
| // Checked status. | ||
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailLink" is not in valid snake_case format, try "$thumbnail_link" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Looping the thumbnail array. | ||
| foreach ( $thumbnailArray as $key => $thumbnailLink ) { | ||
| // Checked status. | ||
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$preSelectedThumbnail" is not in valid snake_case format, try "$pre_selected_thumbnail" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // Checked status. | ||
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; | ||
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; | ||
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; | ||
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
| $preSelectionStatus = ( $thumbnailLink === $preSelectedThumbnail ) ? 'checked=checked' : ''; | ||
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Concat operator must be surrounded by a single space (Squiz.Strings.ConcatenationSpacing.PaddingFound).
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$preSelectionStatus" is not in valid snake_case format, try "$pre_selection_status" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
| // String concatenation. | ||
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailLink" is not in valid snake_case format, try "$thumbnail_link" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Concat operator must be surrounded by a single space (Squiz.Strings.ConcatenationSpacing.PaddingFound).
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces after opening parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket).
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Expected 1 spaces before closing parenthesis; 0 found (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket).
| $htmlString .= "<li style='width: 150px;display: inline-block;'>"; | ||
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$thumbnailLink" is not in valid snake_case format, try "$thumbnail_link" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
rtBot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; | ||
| $htmlString .= "</label></li>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $htmlString .= "<label for='rtmedia-upload-select-thumbnail-'" . esc_attr($key + 1) . "'>"; | ||
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; | ||
| $htmlString .= "</label></li>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: String "</label></li>" does not require double quotes; use single quotes instead (Squiz.Strings.DoubleQuoteUsage.NotRequired).
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; | ||
| $htmlString .= "</label></li>"; | ||
| $htmlString .= "</li>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $htmlString .= "<input type='checkbox'". $preSelectionStatus ." onclick='yepShowAlert(this)' id='rtmedia-upload-select-thumbnail-". esc_attr($key + 1) ."' value='". esc_attr($thumbnailLink) ."' class='rtEditThumbnail' name='rtmedia-thumbnail' />"; | ||
| $htmlString .= "<img src='". esc_url($uploads['baseurl'] .'/'. $thumbnailLink) ."' style='max-height: 120px;max-width: 120px; vertical-align: middle;'/>"; | ||
| $htmlString .= "</label></li>"; | ||
| $htmlString .= "</li>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: String "</li>" does not require double quotes; use single quotes instead (Squiz.Strings.DoubleQuoteUsage.NotRequired).
| } | ||
|
|
||
| // HTML output buffering ends. | ||
| $htmlString .= '</ul>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| $form_fields['rtmedia_video_thumbnail'] = array( | ||
| 'label' => 'Video Thumbnails', | ||
| 'input' => 'html', | ||
| 'html' => $htmlString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Variable "$htmlString" is not in valid snake_case format, try "$html_string" (WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase).
| 'input' => 'html', | ||
| 'html' => $htmlString, | ||
| ); | ||
| // Return parameter array value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Inline comments must end in full-stops, exclamation marks, or question marks (Squiz.Commenting.InlineComment.InvalidEndChar).
| * Save selected video thumbnail in attachment meta. | ||
| * Selected thumbnail use as cover art for buddypress activity if video was uploaded in activity. | ||
| * | ||
| * this is a process function of show_video_thumbnail_in_attachment_edit_page() function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Doc comment short description must start with a capital letter (Generic.Commenting.DocComment.ShortNotCapital).
| * This Function also Save selected video thumbnail in attachment meta in attached video file. | ||
| * This Function will also connected to rtMedia Plugin. | ||
| * Selected thumbnail use as cover art for buddyPress activity if video was uploaded in activity. | ||
| * @since 1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: There must be exactly one blank line before the tags in a doc comment (Generic.Commenting.DocComment.SpacingBeforeTags).
| * | ||
| * @param array $post An array of post data. | ||
| * @return array $form_fields | ||
| * @param array $post An array of post data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Spaces must be used for mid-line alignment; tabs are not allowed (WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed).
Thumbnail is not changing from the WordPress media # issue 253