Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ Adds a new Tabbed Settings page #27

Merged
merged 9 commits into from
Oct 30, 2013
Merged

Conversation

shadyvb
Copy link
Contributor

@shadyvb shadyvb commented Aug 25, 2013

  • Adds option to disable minification alltogether
  • Adds option to disable minification based on specific conditions ( islogged, is_admin, query var present )
  • Adds option to exclude resources, line-delimited, based on string search not matching, means it matches any part of the url
  • Note: Disabling minification does not disable serving minified files, so cached pages does not break.

+ Adds option to disable minification alltogether
+ Adds option to disable minification based on specific conditions ( islogged, is_admin, query var present )
+ Adds option to exclude resources, line-delimited, based on string search not matching, means it matches any part of the url
* Note: Disabling minification does not disable serving minified files, so cached pages does not break.
…es. xwp#5

* Fix a small translation missing text domain
* Remove trailing spaces
@lkraav
Copy link

lkraav commented Sep 3, 2013

Trying this functionality out, because s2member plugin doing some funky stuff with its enqueueing and needs to be excluded.

First comment: commit messages should be better.

http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

@lkraav
Copy link

lkraav commented Sep 3, 2013

Second, I think you have some whitespace issues in a7f751e visible in at least the constants section in the very start of the commit. You should not be changing constant order or upstream code whitespace format.

@westonruter
Copy link
Contributor

Re: commit messages, yes they should ideally be composed according to that note. Although the prefixing of each line with + or * is kinda helpful, this information can also be obtained with a log stat; so we try to have the commit summary be in the imperative form, like:

Add a new Tabbed Settings page

or

Expose default option for exclusion

Not a huge deal though.

@lkraav
Copy link

lkraav commented Sep 3, 2013

Functionality: what I'd like to see for URL exclusion is also a filter implementation, so code-based overrides become possible. Then admin UI should also use the filter to do its thing.

Starting with just the filter would probably be the minimal viable product that has a chance of getting merged quick.

@lkraav
Copy link

lkraav commented Sep 3, 2013

@westonruter
Copy link
Contributor

@shadyvb
Copy link
Contributor Author

shadyvb commented Sep 3, 2013

@lkraav

  • The note just makes sense, thanks for that.
  • Regarding white spaces, not sure if you noticed, but i added a -slightly longer- constant, so i had to realign all lines, as per Wordpress coding standards stated in Contributing.md

@@ -49,7 +54,21 @@ static function setup() {
||
in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) )
);
if ( $is_frontend ) {
$disabled = (
! empty( self::$options['disabled_on_conditions']['all'] )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shadyvb Notice: Undefined index: all

<?php esc_html_e( 'Administrators', 'depmin' ) ?>
</label>
<label for="options[disabled_on_conditions][queryvar][enabled]">
<input type="checkbox" name="options[disabled_on_conditions][queryvar][enabled]" id="options[disabled_on_conditions][queryvar][enabled]" <?php echo checked( self::$options['disabled_on_conditions']['queryvar']['enabled'] ) ?> value="1">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to call "echo" for checked() function.

@shadyvb
Copy link
Contributor Author

shadyvb commented Oct 16, 2013

Did some fixes to comply with WPCS in code, not only related to PR, only remaining issues are mostly related to indentation.

UPDATE: @westonruter I just figured out that i shouldn't have fixed CS issues on this PR, it'd make it quite hard for code review. Sorry!

@@ -186,7 +204,8 @@ static function admin_notices() {
?>
<div class="error">
<p><?php
echo sprintf(
echo esc_html(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this yet.. but how you use esc_html with some HTML tags in the string? Can you check this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed in shadyvb@a18558f

westonruter added a commit that referenced this pull request Oct 30, 2013
Adds a new Tabbed Settings page
@westonruter westonruter merged commit 65c599c into xwp:develop Oct 30, 2013
@westonruter
Copy link
Contributor

This has been open too long, sorry @shadyvb. Now that it is in develop we can work toward the next release. One thing I need to do is add Travis CI.

@westonruter
Copy link
Contributor

Opened PR #44 to track additional fixes for PHP_CodeSniffer, and for the 1.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants