Skip to content
Snippets Groups Projects
Commit 893d3d6e authored by lucha's avatar lucha Committed by agata
Browse files

Patch themes twenty*

Patch theme twentyten, twentyeleven, twentytwelve, twentythirtheen,
twentyfourteen, twentyfifteen, twentysixteen, twentyseventeen

Added a/i credits, and removed Google Fonts API.
parent 455ef1e9
Branches
Tags
No related merge requests found
<?php <?php
/** /**
* The template for displaying the footer * The template for displaying the footer
* *
* Contains the closing of the "site-content" div and all content after. * Contains the closing of the "site-content" div and all content after.
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Fifteen * @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0 * @since Twenty Fifteen 1.0
*/ */
?> ?>
</div><!-- .site-content --> </div><!-- .site-content -->
<footer id="colophon" class="site-footer" role="contentinfo"> <footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info"> <div class="site-info">
<?php <?php
/** /**
* Fires before the Twenty Fifteen footer text for footer customization. * Fires before the Twenty Fifteen footer text for footer customization.
* *
* @since Twenty Fifteen 1.0 * @since Twenty Fifteen 1.0
*/ */
do_action( 'twentyfifteen_credits' ); do_action( 'twentyfifteen_credits' );
?> ?>
<?php <?php
if ( function_exists( 'the_privacy_policy_link' ) ) { if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
} }
?> ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>" class="imprint"> <strong>Proudly powered by <a href="http://www.autistici.org">R*</a></strong>
<?php </div><!-- .site-info -->
/* translators: %s: WordPress */ </footer><!-- .site-footer -->
printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' );
?> </div><!-- .site -->
</a>
</div><!-- .site-info --> <?php wp_footer(); ?>
</footer><!-- .site-footer -->
</body>
</div><!-- .site --> </html>
<?php wp_footer(); ?>
</body>
</html>
This diff is collapsed.
<?php <?php
/** /**
* The template for displaying the footer * The template for displaying the footer
* *
* Contains footer content and the closing of the #main and #page div elements. * Contains footer content and the closing of the #main and #page div elements.
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Fourteen * @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0 * @since Twenty Fourteen 1.0
*/ */
?> ?>
</div><!-- #main --> </div><!-- #main -->
<footer id="colophon" class="site-footer" role="contentinfo"> <footer id="colophon" class="site-footer" role="contentinfo">
<?php get_sidebar( 'footer' ); ?> <?php get_sidebar( 'footer' ); ?>
<div class="site-info"> <div class="site-info">
<?php do_action( 'twentyfourteen_credits' ); ?> <?php do_action( 'twentyfourteen_credits' ); ?>
<?php <?php
if ( function_exists( 'the_privacy_policy_link' ) ) { if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
} }
?> ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfourteen' ) ); ?>" class="imprint"> <strong>Proudly powered by <a href="http://www.autistici.org">R*</a></strong>
<?php </div><!-- .site-info -->
/* translators: %s: WordPress */ </footer><!-- #colophon -->
printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); </div><!-- #page -->
?>
</a> <?php wp_footer(); ?>
</div><!-- .site-info --> </body>
</footer><!-- #colophon --> </html>
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
This diff is collapsed.
...@@ -299,8 +299,8 @@ function twentyseventeen_fonts_url() { ...@@ -299,8 +299,8 @@ function twentyseventeen_fonts_url() {
'subset' => urlencode( 'latin,latin-ext' ), 'subset' => urlencode( 'latin,latin-ext' ),
'display' => urlencode( 'fallback' ), 'display' => urlencode( 'fallback' ),
); );
// A/I removed google fonts
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); $fonts_url = add_query_arg( $query_args, '' );
} }
return esc_url_raw( $fonts_url ); return esc_url_raw( $fonts_url );
...@@ -318,7 +318,8 @@ function twentyseventeen_fonts_url() { ...@@ -318,7 +318,8 @@ function twentyseventeen_fonts_url() {
function twentyseventeen_resource_hints( $urls, $relation_type ) { function twentyseventeen_resource_hints( $urls, $relation_type ) {
if ( wp_style_is( 'twentyseventeen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { if ( wp_style_is( 'twentyseventeen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
$urls[] = array( $urls[] = array(
'href' => 'https://fonts.gstatic.com', // A/I removed google Fonts
'href' => '',
'crossorigin', 'crossorigin',
); );
} }
......
This diff is collapsed.
<?php <?php
/** /**
* Template for displaying the footer * Template for displaying the footer
* *
* Contains the closing of the id=main div and all content * Contains the closing of the id=main div and all content
* after. Calls sidebar-footer.php for bottom widgets. * after. Calls sidebar-footer.php for bottom widgets.
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Ten * @subpackage Twenty_Ten
* @since Twenty Ten 1.0 * @since Twenty Ten 1.0
*/ */
?> ?>
</div><!-- #main --> </div><!-- #main -->
<div id="footer" role="contentinfo"> <div id="footer" role="contentinfo">
<div id="colophon"> <div id="colophon">
<?php <?php
/* /*
* A sidebar in the footer? Yep. You can customize * A sidebar in the footer? Yep. You can customize
* your footer with four columns of widgets. * your footer with four columns of widgets.
*/ */
get_sidebar( 'footer' ); get_sidebar( 'footer' );
?> ?>
<div id="site-info"> <div id="site-info">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?> <?php bloginfo( 'name' ); ?>
</a> </a>
<?php <?php
if ( function_exists( 'the_privacy_policy_link' ) ) { if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '<span role="separator" aria-hidden="true"></span>', '' ); the_privacy_policy_link( '<span role="separator" aria-hidden="true"></span>', '' );
} }
?> ?>
</div><!-- #site-info --> </div><!-- #site-info -->
<div id="site-generator"> <div id="site-generator">
<?php <?php
/** /**
* Fires before the Twenty Ten credits in the footer. * Fires before the Twenty Ten credits in the footer.
* *
* @since Twenty Ten 1.0 * @since Twenty Ten 1.0
*/ */
do_action( 'twentyten_credits' ); do_action( 'twentyten_credits' );
?> ?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyten' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>">
<?php <strong>Proudly powered by <a href="https://www.autistici.org">R*</a></strong>
/* translators: %s: WordPress */
printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); </div><!-- #site-generator -->
?>
</a> </div><!-- #colophon -->
</div><!-- #site-generator --> </div><!-- #footer -->
</div><!-- #colophon --> </div><!-- #wrapper -->
</div><!-- #footer -->
<?php
</div><!-- #wrapper --> /*
* Always have wp_footer() just before the closing </body>
<?php * tag of your theme, or you will break many plugins, which
/* * generally use this hook to reference JavaScript files.
* Always have wp_footer() just before the closing </body> */
* tag of your theme, or you will break many plugins, which
* generally use this hook to reference JavaScript files. wp_footer();
*/ ?>
</body>
wp_footer(); </html>
?>
</body>
</html>
...@@ -305,6 +305,7 @@ add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); ...@@ -305,6 +305,7 @@ add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' );
* @param string $relation_type The relation type the URLs are printed. * @param string $relation_type The relation type the URLs are printed.
* @return array URLs to print for resource hints. * @return array URLs to print for resource hints.
*/ */
/*
function twentythirteen_resource_hints( $urls, $relation_type ) { function twentythirteen_resource_hints( $urls, $relation_type ) {
if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) {
...@@ -321,6 +322,7 @@ function twentythirteen_resource_hints( $urls, $relation_type ) { ...@@ -321,6 +322,7 @@ function twentythirteen_resource_hints( $urls, $relation_type ) {
return $urls; return $urls;
} }
add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 ); add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 );
*/
/** /**
* Enqueue styles for the block-based editor. * Enqueue styles for the block-based editor.
......
...@@ -208,6 +208,7 @@ add_action( 'enqueue_block_editor_assets', 'twentytwelve_block_editor_styles' ); ...@@ -208,6 +208,7 @@ add_action( 'enqueue_block_editor_assets', 'twentytwelve_block_editor_styles' );
* @param string $relation_type The relation type the URLs are printed. * @param string $relation_type The relation type the URLs are printed.
* @return array URLs to print for resource hints. * @return array URLs to print for resource hints.
*/ */
/*
function twentytwelve_resource_hints( $urls, $relation_type ) { function twentytwelve_resource_hints( $urls, $relation_type ) {
if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) && 'preconnect' === $relation_type ) { if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) {
...@@ -224,6 +225,7 @@ function twentytwelve_resource_hints( $urls, $relation_type ) { ...@@ -224,6 +225,7 @@ function twentytwelve_resource_hints( $urls, $relation_type ) {
return $urls; return $urls;
} }
add_filter( 'wp_resource_hints', 'twentytwelve_resource_hints', 10, 2 ); add_filter( 'wp_resource_hints', 'twentytwelve_resource_hints', 10, 2 );
*/
/** /**
* Filter TinyMCE CSS path to include Google Fonts. * Filter TinyMCE CSS path to include Google Fonts.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment