P}0qJ{sJ0nJYJPnJ`nJpnJQJnJnJnJnJnJnJnJnJnJ nJ0nJ@nJPnJ`nJpnJ}WJnJnJnJnJnJnJnJnJnJ nJ0nJ@nJPnJ`nJpnJnJnJnJnJnJnJnJnJnJnJ nJ0nJ@nJPnJ`nJpnJnJnJДWJnJnJnJnJnJnJnJ nJ0nJ@nJPnJ <`JpnJnJnJnJnJnJnJ@.XJnJnJnJ nJ0nJ@nJPnJ`nJpnJnJnJnJnJnJnJnJnJnJnJ nJ0nJ@nJPnJPC`JWJnJnJ]JnJnJnJnJnJnJnJ nJ0nJ@nJPnJ`nJpnJnJnJ[JnJnJnJnJqJuavc`+oJp*oJP+oJ`*oJ*oJoJrpJss="' . esc_attr( join( ' ', inspiro_get_footer_class( $class ) ) ) . '"'; } /** * Retrieves an array of the class names for the footer element. * * @since 1.0.0 * @see https://core.trac.wordpress.org/browser/tags/5.5.1/src/wp-includes/post-template.php#L608 * * @param string|string[] $class Space-separated string or array of class names to add to the class list. * @return string[] Array of class names. */ function inspiro_get_footer_class( $class = '' ) { $classes = array( 'site-footer' ); $widgets_columns = inspiro_get_theme_mod( 'footer-widget-areas' ); $has_footer_widgets = false; if ( $widgets_columns > 0 ) { for ( $i = 0; $i <= intval( $widgets_columns ); $i++ ) { // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed if ( $has_footer_widgets ) { $classes[] = 'has-footer-widgets'; break; } $has_footer_widgets = is_active_sidebar( "footer_$i" ); } } if ( ! empty( $class ) ) { if ( ! is_array( $class ) ) { $class = preg_split( '#\s+#', $class ); } $classes = array_merge( $classes, $class ); } else { // Ensure that we always coerce class to being an array. $class = array(); } $classes = array_map( 'esc_attr', $classes ); /** * Filters the list of CSS footer class names. * * @since 1.0.0 * * @param string[] $classes An array of footer class names. * @param string[] $class An array of additional class names added to the footer. */ $classes = apply_filters( 'inspiro_footer_class', $classes, $class ); return array_unique( $classes ); } /** * Checks to see if we're on the front page or not. */ function inspiro_is_frontpage() { return ( is_front_page() && ! is_home() ); } /** * Add a pingback url auto-discovery header for single posts, pages, or attachments. * * @since 1.0.0 * * @return void */ function inspiro_pingback_header() { if ( is_singular() && pings_open() ) { echo ''; } } add_action( 'wp_head', 'inspiro_pingback_header' );