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

Conditional files aren't ignored #42

Closed
dimadin opened this issue May 10, 2015 · 2 comments
Closed

Conditional files aren't ignored #42

dimadin opened this issue May 10, 2015 · 2 comments
Labels
Milestone

Comments

@dimadin
Copy link
Contributor

dimadin commented May 10, 2015

Minit doesn't ignore conditional files added via wp_style_add_data and wp_script_add_data, so it means all files are included, like for default theme, Twenty Fifteen.

If we exclude, for example, those styles, Minit file is included after them, not before, as they depend on master style.

@kasparsd kasparsd added the bug label Dec 6, 2015
@kasparsd
Copy link
Owner

kasparsd commented Dec 6, 2015

Indeed. We should take special care with the following extra attribute values:

  • conditional string Comments for IE 6, lte IE 7 etc.
  • rtl bool|string To declare an RTL stylesheet.
  • suffix string Optional suffix, used in combination with RTL.
  • alt bool For rel=”alternate stylesheet”.
  • title string For preferred/alternate stylesheets.

@kasparsd kasparsd added this to the 0.3 milestone Dec 7, 2015
@kasparsd
Copy link
Owner

This has been fixed in 1.4.0:

minit/src/minit-js.php

Lines 71 to 90 in 7849b35

$extra = $this->get_script_data(
$this->done,
array(
'data',
'before',
'after',
)
);
if ( ! empty( $extra['data'] ) ) {
$this->handler->add_data( self::ASSET_HANDLE, 'data', implode( "\n", $extra['data'] ) );
}
if ( ! empty( $extra['before'] ) ) {
$this->handler->add_data( self::ASSET_HANDLE, 'before', $extra['before'] );
}
if ( ! empty( $extra['after'] ) ) {
$this->handler->add_data( self::ASSET_HANDLE, 'after', $extra['after'] );
}

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

No branches or pull requests

2 participants