Skip to content

Instantly share code, notes, and snippets.

View chuckreynolds's full-sized avatar
🤖
building things

Chuck Reynolds chuckreynolds

🤖
building things
View GitHub Profile
@chuckreynolds
chuckreynolds / RPC Pint List
Last active August 11, 2021 00:41
Wordpress Ping Setup - updated mid-2021
http://rpc.pingomatic.com/
https://rpc.twingly.com/
http://blogmatcher.com/u.php
http://ping.feedburner.com
http://ping.blo.gs/
http://www.weblogues.com/RPC/
http://www.blogdigger.com/RPC2
http://pingoat.com/goat/RPC2
https://www.pingmyblog.com/
http://blogsearch.google.com/ping/RPC2
@chuckreynolds
chuckreynolds / Wordpress .HTACCESS file
Created June 25, 2009 06:39
Hardened .htaccess file for WP installs
# canonical redirect to no www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# protect wp-config at all cost
<files wp-config.php>
Order deny,allow
deny from all
</files>
@chuckreynolds
chuckreynolds / robots.txt
Last active July 17, 2024 16:57
Solid start Robots.txt for WordPress Sites. (HEADS UP: Make sure you're viewing the most recent version of this Gist) https://gist.github.com/chuckreynolds/135728/
# robots.txt for wordpress
# https://gist.github.com/chuckreynolds/135728
User-agent: *
Disallow: /*.php$
Disallow: /cgi-bin/
Disallow: /comment-page-*
Disallow: /?s=*
Disallow: /search/*
Disallow: /trackback/
@chuckreynolds
chuckreynolds / Podcast Ping Services
Created September 24, 2009 02:44
Podcast Specific Pings for Wordpress
http://audiorpc.weblogs.com/RPC2
http://www.allpodcasts.com/Ping.aspx
http://www.podnova.com/xmlrpc.srf
http://ping.podcast.com/ping.php
@chuckreynolds
chuckreynolds / Add-default-gravatar-wordpress.php
Created January 15, 2010 02:10
Adds a default Gravatar through functions.php to Wordpress
<?php
// Add a default Gravatar if user doesn't have one
if ( !function_exists('rYno_newgravatar') ) {
function rYno_newgravatar( $avatar_defaults ) {
$newgravatar = get_bloginfo('template_url').'/images/new-gravatar.gif';
$avatar_defaults[$newgravatar] = 'New Custom Gravatar';
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'rYno_newgravatar' );
/** Debugging WP */
define('WP_DEBUG', true); //enable the reporting of notices during development - E_ALL
define('WP_DEBUG_DISPLAY', true); //use the globally configured setting for display_errors and not force errors to be displayed
define('WP_DEBUG_LOG', true); //error logging to wp-content/debug.log
define('SCRIPT_DEBUG', true); //loads the development (non-minified) versions of all scripts and CSS and disables compression and concatenation,
define('E_DEPRECATED', false); //E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT
define('AUTOSAVE_INTERVAL', '300'); // Autosave interval
define('SAVEQUERIES', true); // Analyse queries
define('WP_POST_REVISIONS', false);
@chuckreynolds
chuckreynolds / wp-tags-to-cats.sql
Last active December 14, 2015 08:08
SQL Query turn WordPress Tags into Categories
UPDATE wp_term_taxonomy SET taxonomy='post_tag', parent=0 WHERE taxonomy='category';
@chuckreynolds
chuckreynolds / wp-spam-proof-emails.php
Last active December 14, 2015 08:09
Automatically Spam Proof Emails on a WordPress Site
function security_remove_emails($content) {
$pattern = '/([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})/i';
$fix = preg_replace_callback($pattern,
&quot;security_remove_emails_logic&quot;, $content);
return $fix;
}
function security_remove_emails_logic($result) {
return antispambot($result[1]);
}
@chuckreynolds
chuckreynolds / wp-rem-comment-url.php
Created February 28, 2013 09:12
Remove WordPress Comment Form URL field. Had a client that needed the URL field gone from the comment forms primarily for spam and they just didn't need the extra data so we nuked it.
function vuurr_nuke_comment_url_field($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','vuurr_nuke_comment_url_field');
@chuckreynolds
chuckreynolds / wp-login-logo-link.php
Created February 28, 2013 09:14
Change WordPress wp-login.php form header logo and link and title