Skip to content

Instantly share code, notes, and snippets.

@robneu
robneu / plugin.php
Last active December 30, 2015 19:09 — forked from jeherve/plugin.php
<?php
/**
* An array of Jetpack modules which will be whitelisted.
*
* This whitelist contains a list of all Jetpack modules which we would like users
* to have access to. Anything not listed here will be programmatically disabled.
*
* @author FAT Media, LLC
* @link http://wpbacon.com/disable-jetpack-modules/
@robneu
robneu / genesis-chrome-font-fix.css
Created December 30, 2013 06:35
Genesis chrome font size fix
/* Safari 3+ & Chrome1+ Specific Styles
--------------------------------------------- */
@media screen and (-webkit-min-device-pixel-ratio:0) {
body > div {
font-size: 16px;
font-size: 1.6rem;
}
}
@robneu
robneu / latest-tweets-follow-button.php
Last active January 2, 2016 02:29
Add a follow call to action to the bottom of the latest tweets widget for WordPress
<?php
add_filter( 'latest_tweets_render_after', 'prefix_add_follow_button', 10, 0 );
/**
* Add a follow link to the bottom of the latest tweets widget.
*
* @author FAT Media, LLC
* @link http://wpbacon.com/tutorials/latest-tweets-follow-button/
*
* @todo Change 'prefix' to your theme or plugin prefix.
* @todo Change 'text-domain' to your theme or plugin text domain.
@robneu
robneu / gform-split-test.php
Last active January 2, 2016 10:19
Create an A/B Split test using GravityForms
<?php
/**
* Create a split test using two different GravityForms
*
* Allows you to test the effectiveness of two different forms by displaying each
* one 50% of the time. Tracking CTR using the built-in GravityForms functionality
* should give you an idea of which form is most effective.
*
* @uses GravityForms
* @author FAT Media, LLC
@robneu
robneu / get-script-handles.php
Last active April 25, 2024 01:01
Display a list of all currently enqueued script handles. Useful for manual minification when using Better WordPress Minify and other similar plugins.
<?php
/**
* Output a list of all enqueued script handles.
*
* @author FAT Media, LLC
* @global $wp_scripts
* @todo Change 'prefix' to your theme or plugin prefix.
*/
function prefix_print_script_handles() {
<?php
// Site to redirect.
$url = 'http://mydomain.com';
// Send header information.
header( 'Location: ' . $url, true, 301 );
// Done.
exit();
@robneu
robneu / genesis-seo-post-info.php
Last active January 4, 2016 05:09
The default Genesis post info can be tweaked for a bit of extra SEO goodness. This will change your posts publish date to use the last-updated date instead. It also allows you to select a custom author page rather than using the standard post archive. This part is optional and doesn't affect the post date at all.
<?php
/**
* Some tweaks to the Genesis post info for SEO purposes.
*
* This set of functions are designed to change the output of the Genesis post info
* to reflect the date a post was updated rather than the date it was published. A
* function to set a custom author page is also included and is entirely optional.
*
* @author FAT Media, LLC
* @link http://auditwp.com/genesis-post-info-seo/
@robneu
robneu / install-wordpress-ssh.el
Last active April 3, 2018 07:20
How to Install WordPress via SSH - Installing WordPress via the command line is one of the fastest, easiest ways to get up and running on WordPress. Running this command will take literally 30 seconds. Assuming you've already created a database, all you have to do is run the WordPress install script and you're ready to start publishing!
wget -qO- http://wordpress.org/latest.tar.gz | tar xz && cp -rpf wordpress/* . && rm -r wordpress
@robneu
robneu / wordpress-browser-cache-htaccess
Created February 3, 2014 05:39
.htaccess rules for WordPress browser caching.
# BEGIN Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
@robneu
robneu / cpanel-nginx.conf
Created March 17, 2014 05:32
Cpanel Nginx Conf. Use at your own risk.
user nobody;
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that
worker_processes 2;
# number of file descriptors used for nginx
# the limit for the maximum FDs on the server is usually set by the OS.
# if you don't set FD's then OS settings will be used which is by default 2000
worker_rlimit_nofile 100000;