%{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 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 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; |
This file contains 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 | |
/** | |
* Define the min version you support. Here I use 5.6 as example but change it to match your support version. | |
*/ | |
define( 'PREFIX_MIN_PHP_VERSION', '5.6' ); | |
/** | |
* Attach a function to check php version on the `after_theme_switch` hook. | |
*/ | |
add_action( 'after_switch_theme', 'prefix_test_for_min_php' ); |
This file contains 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 | |
/** | |
* The register_nav_menus call should go inside your themes setup function | |
* (usually found inside functions.php). | |
*/ | |
register_nav_menus( | |
array( | |
'footer_nav' => __( 'Footer Menu', 'mytheme' ), // example of adding a menu location | |
'top_menu' => __( 'Top Menu', 'mytheme' ), // we will be using this top_menu location |
This file contains 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
#!/bin/bash | |
# clear databse | |
wp db reset --yes | |
# Install WP with long title | |
wp core install --url=http://theme-review.loc --title="This is a really long long title to check if this theme design doesn't break with the long site title" --admin_user=admin --admin_password=admin --admin_email=example@example.com | |
# Update wp. | |
wp core update |
This file contains 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 | |
/** | |
* Puts messages into the error log | |
* | |
* Using php error_log put messages into the log depending on what kind of | |
* variable they are. | |
* | |
* @author William Patton - will@pattonwebz.com | |
* | |
* @param mixed $error this is the error we'll be outputting. Type is ambiguous. |
This file contains 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 | |
/** | |
* Filters the image used in social meta tags added by yoast seo plugin. | |
* | |
* This is used to set a default social share image for various post types. | |
* | |
* @param string $image string containing link to image that is used in tags. | |
* @return string string containing maybe updated url to image | |
*/ | |
function pwwp_filter_yoast_opengraph_image( $image = '' ) { |
NewerOlder