Fix indentation

This commit is contained in:
IanDelMar 2018-11-19 00:38:50 +01:00
parent b1f541fcfc
commit 8ecfeb4436
1 changed files with 35 additions and 31 deletions

View File

@ -10,40 +10,44 @@ if ( ! defined( 'ABSPATH' ) ) {
} }
if ( ! function_exists( 'understrap_site_info' ) ) { if ( ! function_exists( 'understrap_site_info' ) ) {
/** /**
* Add site info hook to WP hook library. * Add site info hook to WP hook library.
*/ */
function understrap_site_info() { function understrap_site_info() {
do_action( 'understrap_site_info' ); do_action( 'understrap_site_info' );
} }
} }
if ( ! function_exists( 'understrap_add_site_info' ) ) { if ( ! function_exists( 'understrap_add_site_info' ) ) {
add_action( 'understrap_site_info', 'understrap_add_site_info' ); add_action( 'understrap_site_info', 'understrap_add_site_info' );
/** /**
* Add site info content. * Add site info content.
*/ */
function understrap_add_site_info() { function understrap_add_site_info() {
$the_theme = wp_get_theme(); $the_theme = wp_get_theme();
$site_info = sprintf( $site_info = sprintf(
'<a href="%1$s">%2$s</a><span class="sep"> | </span>%3$s(%4$s)', '<a href="%1$s">%2$s</a><span class="sep"> | </span>%3$s(%4$s)',
esc_url( __( 'http://wordpress.org/', 'understrap' ) ), esc_url( __( 'http://wordpress.org/', 'understrap' ) ),
sprintf( sprintf(
/* translators:*/ /* translators:*/
esc_html__( 'Proudly powered by %s', 'understrap' ), 'WordPress' esc_html__( 'Proudly powered by %s', 'understrap' ),
), 'WordPress'
sprintf( // WPCS: XSS ok. ),
/* translators:*/ sprintf( // WPCS: XSS ok.
esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="' . esc_url( __( 'http://understrap.com', 'understrap' ) ) . '">understrap.com</a>' /* translators:*/
), esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ),
sprintf( // WPCS: XSS ok. $the_theme->get( 'Name' ),
/* translators:*/ '<a href="' . esc_url( __( 'http://understrap.com', 'understrap' ) ) . '">understrap.com</a>'
esc_html__( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ),
) sprintf( // WPCS: XSS ok.
); /* translators:*/
esc_html__( 'Version: %1$s', 'understrap' ),
$the_theme->get( 'Version' )
)
);
echo apply_filters( 'understrap_site_info_content', $site_info ); // WPCS: XSS ok. echo apply_filters( 'understrap_site_info_content', $site_info ); // WPCS: XSS ok.
} }
} }