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

Twenty Sixteen compat file loaded in the dashboard. #3679

Closed
bhubbard opened this issue Apr 18, 2016 · 0 comments · Fixed by #5454
Closed

Twenty Sixteen compat file loaded in the dashboard. #3679

bhubbard opened this issue Apr 18, 2016 · 0 comments · Fixed by #5454
Assignees
Labels
[Feature] Theme Tools [Focus] Performance [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug
Milestone

Comments

@bhubbard
Copy link
Contributor

I have jetpack loaded on a fresh wordpress install using development mode. I ran the audit tool and noticed that a file called twentysixteen.css.

Currently this file loads in the WordPress admin, but I can't find any page admin page where it is used.

I also noticed it is loading a non-minified file:

function twentysixteen_init_jetpack() {
/**
* Add our compat CSS file for custom widget stylings and such.
* Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
* or skip it entirely for wpcom.
*/
$version = false;
if ( method_exists( 'Jetpack', 'is_development_version' ) ) {
$version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentysixteen.css' ) : JETPACK__VERSION;
}
wp_enqueue_style( 'twentysixteen-jetpack', plugins_url( 'twentysixteen.css', __FILE__ ), array(), $version );
wp_style_add_data( 'twentysixteen-jetpack', 'rtl', 'replace' );
}
add_action( 'init', 'twentysixteen_init_jetpack' );

I suggest we load a minified version, and not in the WordPress Admin. Looks like the same might happen with the twentyfifteen.css file.

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Theme Tools [Team] tdiv labels Apr 18, 2016
@jeherve jeherve added this to the 4.1 milestone Apr 18, 2016
@jeherve jeherve modified the milestones: 4.2, 4.1 Jun 17, 2016
@jeherve jeherve modified the milestones: 4.3, 4.2 Jul 6, 2016
@richardmuscat richardmuscat modified the milestones: 4.3, 4.4 Jul 7, 2016
@jeherve jeherve changed the title Loading of twentysixteen.css Twenty Sixteen compat file loaded in the dashboard. Aug 18, 2016
@georgestephanis georgestephanis self-assigned this Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Theme Tools [Focus] Performance [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants