Skip to content
Justin Tadlock edited this page Sep 18, 2018 · 2 revisions

Mythic does nearly everything it can do to supporting the guidelines at WordPress.org.

I've been both a WordPress Theme Review Team (TRT) admin and moderator. So, I'm quite familiar with the guidelines and will always strive to keep Mythic in line with those.

With that said, I had to make a couple of decisions that are not 100% compatible with the current guidelines and Theme Check. I'm working to get these changed with the TRT, but it can be a process. It's easy to address these issues if you plan on submitting to WordPress.org.

file_get_contents()

Currently, WordPress.org doesn't allow for the safe and legitimate uses of file_get_contents(). It's no problem to work around. This is used once in the app/Providers/AppServiceProvider.php file for asset cache busting:

// Bind the Laravel Mix manifest for cache-busting.
$this->app->singleton( 'mythic/mix', function() {

	$file = get_theme_file_path( 'dist/mix-manifest.json' );

	return file_exists( $file ) ? json_decode( file_get_contents( $file ), true ) : null;
} );

file_get_contents() is the appropriate PHP function to do the above job. However, you'll need to change that code to something like the following:

// Bind the Laravel Mix manifest for cache-busting.
$this->app->singleton( 'mythic/mix', function() {

	$file = get_theme_file_path( 'dist/mix-manifest.json' );

	$contents = file_exists( $file ) ? file( $file ) : false;

	return $contents ? json_decode( join( '', $contents ), true ) : null;
} );

wp_link_pages()

Mythic utilizes Hybrid Core's Pagination class and related functions for handling pagination. Theme Check will say that you are missing a call to wp_link_pages().

In order to change to using wp_link_pages(), you'll need to open resources/views/nav/pagination/post.php and replace the contents of that file with something like:

<?php wp_link_pages() ?>

This may be an issue with comment pagination as well.

Reference: https://developer.wordpress.org/reference/functions/wp_link_pages/

Clone this wiki locally