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 | |
/** | |
* Remove the SearchAction schema from the graph. | |
*/ | |
add_filter( 'wpseo_schema_website', function( $website ) { | |
if ( isset( $website['potentialAction'] ) && is_array( $website['potentialAction'] ) ) { | |
foreach ( $website['potentialAction'] as $key => $action ) { | |
if ( isset( $action['@type'] ) && $action['@type'] === 'SearchAction' ) { | |
unset( $website['potentialAction'][$key] ); |
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
include /etc/nginx/bots.d/abuseipdb; | |
# BingBot | |
13.66.139.0/24 0; | |
13.66.144.0/24 0; | |
13.67.10.16/28 0; | |
13.69.66.240/28 0; | |
13.71.172.224/28 0; | |
139.217.52.0/28 0; |
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 | |
# Save this file as /usr/local/sbin/update-abuseipdb.sh | |
# Edit api key and confidence level | |
# Make it Executable chmod 700 /usr/local/sbin/update-abuseipdb.sh | |
# Daily Cron as root (every 4 hours) | |
# 0 */4 * * * /usr/local/sbin/update-abuseipdb.sh > /dev/null 2>&1 | |
# Include the output in /etc/nginx/bots.d/blacklist-ips.conf | |
# include /etc/nginx/bots.d/abuseipdb; |
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 | |
/* | |
* Plugin Name: Sitemap Test | |
* Description: A simple plugin to test Yoast sitemap integration. | |
*/ | |
function add_to_yoast_sitemap( $custom_sitemaps ) { | |
$custom_sitemaps .= '<sitemap><loc>' . site_url() . '/my-custom-sitemap.xml</loc></sitemap>'; | |
return $custom_sitemaps; |
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 | |
$args = array( | |
'post_type' => 'any', | |
'post_status' => 'publish', | |
'posts_per_page' => - 1, | |
'post_parent' => $post_id, // Available in ACF blocks by default | |
'order' => 'ASC', | |
'orderby' => 'menu_order', | |
'suppress_filters' => false, |
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 | |
######### Disable WordFence Live Traffic ######## | |
define( 'WORDFENCE_DISABLE_LIVE_TRAFFIC', true ); | |
################################################# |
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 | |
/** | |
* Clear Total Cache term listing pages for a post | |
* @param $post_id | |
* @param $post | |
* | |
* @return void | |
*/ | |
function rw_clear_total_cache_terms_pages( $post_id, $post ) { | |
if ( function_exists( 'w3tc_flush_url' ) ) { |
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 | |
/** | |
* Change the label of posts | |
*/ | |
function prefix_change_post_object() { | |
$get_post_type = get_post_type_object('post'); | |
$labels = $get_post_type->labels; | |
$labels->name = 'Projects'; | |
$labels->singular_name = 'Projects'; | |
$labels->add_new = 'Add Projects'; |
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 | |
/** | |
* Change min password strength. | |
* | |
* @author James Kemp (Iconic) | |
* @link http://iconicwp.com/decrease-strength-required-woocommerce-passwords/ | |
* @param int $strength | |
* @return int | |
*/ | |
function myclass_min_password_strength( $strength ) { |
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
<wpml-config> | |
<admin-texts> | |
<key name="wp_2fa_email_settings"> | |
<key name="enforced_email_subject"/> | |
<key name="enforced_email_body"/> | |
<key name="login_code_email_subject"/> | |
<key name="login_code_email_body"/> | |
<key name="user_account_locked_email_subject"/> | |
<key name="user_account_locked_email_body"/> | |
<key name="user_account_unlocked_email_subject"/> |
NewerOlder