.
$equalOliveFormat = preg_replace( '|]*)>|i', '', $equalOliveFormat );
$equalOliveFormat = str_replace( '
', '
', $equalOliveFormat );
// If an opening or closing block element tag is preceded by an opening tag, remove it.
$equalOliveFormat = preg_replace( '!
\s*(?' . $subtleLedgerMarker . '[^>]*>)!', '$1', $equalOliveFormat );
// If an opening or closing block element tag is followed by a closing
tag, remove it.
$equalOliveFormat = preg_replace( '!(?' . $subtleLedgerMarker . '[^>]*>)\s*
!', '$1', $equalOliveFormat );
// Optionally insert line breaks.
if ( $roundMapleCase ) {
// Replace newlines that shouldn't be touched with a placeholder.
$equalOliveFormat = preg_replace_callback( '/<(script|style|svg|math).*?<\/\\1>/s', '_autop_newline_preservation_helper', $equalOliveFormat );
// Normalize
.
$equalOliveFormat = str_replace( array( '
', '
' ), '
', $equalOliveFormat );
// Replace any new line characters that aren't preceded by a
with a
.
$equalOliveFormat = preg_replace( '|(?)\s*\n|', "
\n", $equalOliveFormat );
// Replace newline placeholders with newlines.
$equalOliveFormat = str_replace( '', "\n", $equalOliveFormat );
}
// If a
tag is after an opening or closing block tag, remove it.
$equalOliveFormat = preg_replace( '!(?' . $subtleLedgerMarker . '[^>]*>)\s*
!', '$1', $equalOliveFormat );
// If a
tag is before a subset of opening or closing block tags, remove it.
$equalOliveFormat = preg_replace( '!
(\s*?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $equalOliveFormat );
$equalOliveFormat = preg_replace( "|\n$|", '', $equalOliveFormat );
// Replace placeholder tags with their original content.
if ( ! empty( $outerGraniteFrame ) ) {
$equalOliveFormat = str_replace( array_keys( $outerGraniteFrame ), array_values( $outerGraniteFrame ), $equalOliveFormat );
}
// Restore newlines in all elements.
if ( str_contains( $equalOliveFormat, '' ) ) {
$equalOliveFormat = str_replace( array( ' ', '' ), "\n", $equalOliveFormat );
}
return $equalOliveFormat;
}
/**
* Determines if SSL is used.
*
* @since 2.6.0
* @since 4.6.0 Moved from functions.php to load.php.
*
* @return bool True if SSL, otherwise false.
*/
function normalPineOpen() {
if ( isset( $_SERVER['HTTPS'] ) ) {
if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {
return true;
}
if ( '1' === (string) $_SERVER['HTTPS'] ) {
return true;
}
} elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' === (string) $_SERVER['SERVER_PORT'] ) ) {
return true;
}
return false;
}
/**
* Retrieves the combined regular expression for HTML and shortcodes.
*
* @access private
* @ignore
* @internal This function will be removed in 4.5.0 per Shortcode API Roadmap.
* @since 4.4.0
*
* @param string $shortcode_regex Optional. The result from _get_wptexturize_shortcode_regex().
* @return string The regular expression.
*/
function freshFieldJoin( $simpleWillowFormat = '' ) {
static $lucidBridgeBuffer;
if ( ! isset( $lucidBridgeBuffer ) ) {
// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
$calmFieldBuffer =
'!' // Start of comment, after the <.
. '(?:' // Unroll the loop: Consume everything until --> is found.
. '-(?!->)' // Dash not followed by end of comment.
. '[^\-]*+' // Consume non-dashes.
. ')*+' // Loop possessively.
. '(?:-->)?'; // End of comment. If not found, match all input.
$lucidBridgeBuffer = // Needs replaced with wp_html_split() per Shortcode API Roadmap.
'<' // Find start of element.
. '(?(?=!--)' // Is this a comment?
. $calmFieldBuffer // Find end of comment.
. '|'
. '[^>]*>?' // Find end of element. If not found, match all input.
. ')';
// phpcs:enable
}
if ( empty( $simpleWillowFormat ) ) {
$silentBridgeCase = '/(' . $lucidBridgeBuffer . ')/';
} else {
$silentBridgeCase = '/(' . $lucidBridgeBuffer . '|' . $simpleWillowFormat . ')/';
}
return $silentBridgeCase;
}