TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 429 forks source link

Red Border for Required Plugins #626

Closed cyberwani closed 7 years ago

cyberwani commented 7 years ago

added left-border in plugin list for required plugins.

GaryJones commented 7 years ago

Thanks @cyberwani.

Can you please show a screenshot with your change? Have you checked what happens with the border when the screen is narrow and lines wrap around? Is the red the same hex code of the attention grabbing red in WP core? (For which there's a Trac ticket open by @afercia) to consolidate these down).

You'll need to ensure you meet code standards - see https://travis-ci.org/TGMPA/TGM-Plugin-Activation/jobs/159883749 for issues with your PR.

cyberwani commented 7 years ago

Here are some screenshots: 320px 480px 768px 1440px Cropped

I used same color code used in WordPress warnings.

GaryJones commented 7 years ago

Thanks for providing those. Visually, I'm OK with that. @jrfnl ?

@cyberwani The code will still need fixing for code standards.

jrfnl commented 7 years ago

Visually I like the change, nice one!

Code-wise, quite apart from the code style issues, I'd like to properly review it before merging and it may be a little while before I have the time.

cyberwani commented 7 years ago

@GaryJones @jrfnl I am not familiar with Travis. So, can you both suggest me the further steps?

jrfnl commented 7 years ago

Travis is an automated code check which runs on the code and causing one of the red crosses below. If you click on "Details", you can see which checks are run and which is failing. In this case it is failing as the code does not comply with the WordPress coding standards. For details of what you need to fix, click on the failing build to see the feedback given there: https://travis-ci.org/TGMPA/TGM-Plugin-Activation/jobs/159883749#L202

GaryJones commented 7 years ago

For reference, the following code standards (formatting of the code) need to be addressed:

----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 2099 | ERROR | [ ] Missing function doc comment
      |       |     (Squiz.Commenting.FunctionComment.Missing)
 2754 | ERROR | [x] Concat operator must be surrounded by a single
      |       |     space
      |       |     (Squiz.Strings.ConcatenationSpacing.PaddingFound)
 2754 | ERROR | [ ] Expected next thing to be an escaping function (see
      |       |     Codex for 'Data Validation'), not 'strtolower'
      |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 2754 | ERROR | [x] Expected 1 spaces after opening bracket; 0 found
      |       |     (PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket)
 2754 | ERROR | [x] Expected 1 spaces before closing bracket; 0 found
      |       |     (PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket)
 2754 | ERROR | [x] Concat operator must be surrounded by a single
      |       |     space
      |       |     (Squiz.Strings.ConcatenationSpacing.PaddingFound)
----------------------------------------------------------------------

So, for the indicated lines:

  1. Add a full DocBlock in the correct format for the new function you added.
  2. Add a space either side of the ..
  3. Add esc_attr() call around the strtolower() call. 4, 5 and 6. Add extra spaces as indicated.