%{IPORHOST:remoteaddress} - - \[%{HTTPDATE:timelocal}\] "%{WORD:httpmethod} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:"(?:%{URI:referrer}|-)"|%{QS:referrer}) %{QS:useragent} %{BASE10NUM:request_duration} %{QS:xforwardedfor}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WPF All Sites | |
Plugin URI: verygoodplugins.com | |
Description: Stores log of all sites that call home looking for updates | |
Version: 1.0 | |
Author: vergoodplugins | |
Author URI: verygoodplugins.com | |
License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function () { | |
/* | |
* Find any insteances of the selector in oldTag and replace it with the tag from newTag. | |
*/ | |
function replaceHeadingLevel(oldTag, newTag) { | |
document.querySelectorAll(oldTag).forEach(function (element) { | |
var newHeading = document.createElement(newTag); | |
newHeading.innerHTML = element.innerHTML; | |
// Copy attributes from old heading to new heading. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fix incorrect heading order in post content. | |
* | |
* @param string $content The post content. | |
* @return string Modified content with correct heading structure. | |
*/ | |
function fix_heading_order_in_content( $content ) { | |
// Replace incorrect H2 with H3 (example scenario). | |
$content = preg_replace( '/<h2([^>]*)>(.*?)<\/h2>/', '<h3$1>$2</h3>', $content ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Somewhere inside the template you should find headers. Add a conditional to use h1 on single article | |
// header and h2 otherwise. | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<header class="entry-header"> | |
<?php if ( is_singular() ) : ?> | |
<h1 class="entry-title"><?php the_title(); ?></h1> <!-- Ensure this is H1 --> | |
<?php else : ?> | |
<h2 class="entry-title"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'edac_filter_frontend_highlighter_visibility', function () { | |
return is_logged_in(); | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'edac_filter_frontend_highlighter_visibility', '__return_true' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function disable_core_search_query_handling($query, $error = true) { | |
if (is_search() && !is_admin()) { | |
$query->is_search = false; | |
$query->query_vars['s'] = false; | |
$query->query['s'] = false; | |
// to error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.compare-table--wrapper { | |
background: #f5f5f5; | |
max-width: 740px; | |
border-radius: 24px; | |
margin: 0 auto; | |
} | |
.compare-table { | |
border-collapse: separate; |
NewerOlder