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
<IfModule mod_expires.c> | |
ExpiresActive on | |
# Perhaps better to whitelist expires rules? Perhaps. | |
ExpiresDefault "access plus 1 month" | |
# Data | |
ExpiresByType text/xml "access plus 0 seconds" | |
ExpiresByType application/xml "access plus 0 seconds" | |
ExpiresByType application/json "access plus 0 seconds" |
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 | |
/** | |
* The template used for displaying page content in page.php | |
* | |
* @package WordPress | |
* @subpackage Twenty_Eleven | |
* @since Twenty Eleven 1.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
#!/C/xampp/php/php | |
<?php | |
#!/usr/bin/env php | |
/** | |
* Git pre-commit hook to run php lint. | |
* | |
* Git hooks on Windows: Ensure that the path to PHP is added to the %PATH% variable, and run `git commit` via the Bash shell. | |
* | |
* @copyright 2012-04-30 N.D.Freear. | |
* @license MIT |
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
WordPress is actually one of the most secure pieces of software available. It powers 17% | |
of the 1,000,000 most visited websites, so it is being constantly tested both internally | |
and by hackers. When an issue is discovered, an update is released which you can install | |
with one click in the dashboard. | |
The vast majority of hacked WordPress websites are running an out-of-date version of | |
WordPress. Once WordPress is updated, any vulnerabilities that are patched are now publicly | |
known, so old versions are vulnerable. | |
The next most likely source of hacking is your host. If your server isn't secure, it doesn't |
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
<!-- in footer.php --> | |
<div class="footer-text"><?php echo get_theme_mod('footer_text') ?></div> | |
<!-- rendered HTML content --> | |
<div class="footer-text">©2012 Site Name</div> | |
<!--in functions.php (to enable the field in the Theme Customizer) --> | |
<?php |
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 | |
/** | |
* Grid Content | |
* Change the number of words in excerpt if in the grid loop | |
*/ | |
function be_grid_content() { | |
// First, we make sure we're in the grid loop. | |
if( ! apply_filters( 'is_genesis_grid_loop', false ) ) | |
return; |
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 | |
/* | |
* Check the URL of the WordPress login | |
* page for a specific query string | |
* | |
* assumes login string is | |
* http://mysite.com/wp-login.php?question=answer | |
*/ | |
function rkv_login_stringcheck() { |
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 | |
//let's get some tweets!! | |
//first, let's see if I've got the data already cached | |
$tweets = get_transient("tweets"); | |
//dang it! it looks like I might not. let's grab some tweets from the Twitter API | |
if( !$tweets ) { |
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 | |
/* | |
Author: Pete Nelson @GunGeekATX | |
Expands upon the Custom Meta Boxes library to provide a user-facing input form, | |
list & detail page of custom post types. This code sample doesn't include all the libraries | |
such as jQuery tablesorter or validate but can be found elsewhere easily enough. | |
*/ |
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
/** Define Gravity Forms License Key */ | |
define("GF_LICENSE_KEY", "YOUR-LICENSE-KEY-HERE"); |
OlderNewer