Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
building things

Chuck Reynolds chuckreynolds

🤖
building things
View GitHub Profile
View RPC Pint List
http://rpc.pingomatic.com/
http://rpc.twingly.com/
http://rpc.weblogs.com/RPC2
http://rpc.technorati.com/rpc/ping
http://services.newsgator.com/ngws/xmlrpcping.aspx
http://api.moreover.com/RPC2
http://bblog.com/ping.php
http://blogsearch.google.com/ping/RPC2
http://ping.weblogalot.com/rpc.php
http://ping.feedburner.com
@chuckreynolds
chuckreynolds / Wordpress .HTACCESS file
Created Jun 25, 2009
Hardened .htaccess file for WP installs
View Wordpress .HTACCESS file
# 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 Jul 24, 2020
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/
View robots.txt
# robots.txt for wordpress
# https://gist.github.com/chuckreynolds/135728
User-agent: *
Disallow: /cgi-bin/
Disallow: /trackback/
Disallow: /comment-page-*
Disallow: /?s=*
Disallow: /*.php$
@chuckreynolds
chuckreynolds / Podcast Ping Services
Created Sep 24, 2009
Podcast Specific Pings for Wordpress
View Podcast Ping Services
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 Jan 15, 2010
Adds a default Gravatar through functions.php to Wordpress
View Add-default-gravatar-wordpress.php
<?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' );
View WP-debug-wpconfig.php
/** 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 Dec 14, 2015
SQL Query turn WordPress Tags into Categories
View wp-tags-to-cats.sql
UPDATE wp_term_taxonomy SET taxonomy='post_tag', parent=0 WHERE taxonomy='category';
@chuckreynolds
chuckreynolds / wp-spam-proof-emails.php
Last active Dec 14, 2015
Automatically Spam Proof Emails on a WordPress Site
View wp-spam-proof-emails.php
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 Feb 28, 2013
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.
View wp-rem-comment-url.php
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 Feb 28, 2013
Change WordPress wp-login.php form header logo and link and title
View wp-login-logo-link.php