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
object(Auth_OpenID_FailureResponse)#95 (6) { | |
["status"]=> string(7) "failure" | |
["endpoint"]=> NULL | |
["identity_url"]=> NULL | |
["message"]=> string(34) "Server denied check_authentication" | |
["contact"]=> NULL | |
["reference"]=> NULL | |
} | |
NOT authenticated |
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
# block visitors referred from semalt.com and buttons-for-website.com | |
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} semalt\.com [NC] | |
RewriteRule .* - [F] | |
RewriteCond %{HTTP_REFERER} buttons\-for\-website\.com | |
RewriteRule ^.* - [F,L] | |
RewriteCond %{HTTP_REFERER} buttons\-for\-your\-website\.com | |
RewriteRule ^.* - [F,L] |
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
To recursively give directories read&execute privileges: | |
find /path/to/base/dir -type d -exec chmod 755 {} + | |
To recursively give files read privileges: | |
find /path/to/base/dir -type f -exec chmod 644 {} + | |
Or, if there are many objects to process: |
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
function get_tag( $attr, $value, $xml, $tag=null ) { | |
if( is_null($tag) ) | |
$tag = '\\w+'; | |
else | |
$tag = preg_quote($tag); | |
$attr = preg_quote($attr); | |
$value = preg_quote($value); | |
$tag_regex = "/<(".$tag.")[^>]*$attr\\s*=\\s*". |
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
# Block semalt.com buttons-for-website.com buttons-for-your-website.com best-seo-offer.com 100dollars-seo.com semaltmedia.com as referral spam | |
# (c) 2015 Rolands Umbrovskis, http://umbrovskis.com | |
# if code above do not work: | |
if ($http_referer ~ "(semaltmedia\.com|100dollars-seo\.com|semalt\.com|buttons-for-website.com|buttons-for-your-website\.com|best-seo-offer\.com)") { | |
set $prohibited "1"; | |
} | |
if ($prohibited) { | |
return 403; |
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/sh | |
# Author: https://github.com/lolwhoami/referrer-spam-blacklist/commit/b25bb159d95c0fc82ea731750f0461bd85b72a91 | |
# use this inside 'server { ... }' | |
# | |
# include spammers.nginx.conf; | |
# if($bad_referer) { | |
# return 444; | |
# } | |
conf='./spammers.nginx.conf' |
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 | |
/** | |
* Template Name: Google+ Feed | |
*/ | |
/** | |
* A WordPress page template for a Google+ feed. | |
* | |
* @author Dominik Schilling |
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 | |
/** | |
* Filename-based cache busting for WordPress scripts/styles. | |
* | |
* Extend your .htaccess file with these lines: | |
* | |
* <IfModule mod_rewrite.c> | |
* RewriteEngine On | |
* RewriteBase / | |
* |
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 | |
/** | |
* Is login or register page | |
* @author umbrovskis | |
* @authorlink http://umbrovskis.com | |
*/ | |
function smc_is_login_page() { | |
return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); | |
} | |
// hope some day WordPress will make is_login_page() or is_register_page() or similar |
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: WP_Rewrite endpoints demo | |
Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
Author: Jon Cave | |
Author URI: http://joncave.co.uk/ | |
*/ | |
function makeplugins_endpoints_add_endpoint() { |
OlderNewer