This file contains hidden or 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: Recent Posts Widget | |
Plugin URI: http://gregrickaby.com | |
Description: Display recent posts in a widget area. | |
Version: 1.0.0 | |
Author: Greg Rickaby | |
Author URI: http://gregrickaby.com | |
License: GPLv2 | |
Text Domain: textdomain |
This file contains hidden or 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
# APACHE .HTACCESS | |
# This will deny all traffic (except yours) to /wp-admin (including wp-login.php) | |
# It will also return a 403 forbidden error. | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444$ | |
RewriteRule ^(.*)$ - [R=403,L] |
This file contains hidden or 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 | |
// DO NOT INCLUDE THE OPENING PHP TAG AND INSERT INTO FUNCTIONS.PHP | |
add_action( 'admin_footer', 'custom_new_link_auto_check', 9999 ); | |
/** | |
* Auto check the "Open link in a new window/tab" modal | |
*/ | |
function custom_new_link_auto_check() { ?> | |
<script type="text/javascript"> |
This file contains hidden or 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 | |
// DO NOT INCLUDE OPENING PHP TAG | |
add_filter( 'img_caption_shortcode', 'custom_remove_additional_10px_from_captions', 10, 3 ); | |
/** | |
* Prevent Wordpress from inserting an extra 10px of width to image caption shortcodes. | |
*/ | |
function custom_remove_additional_10px_from_captions( $val, $attr, $content = null ) { | |
extract( shortcode_atts( array( |
This file contains hidden or 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 | |
// DO NOT INCLUDE OPENING PHP TAG | |
/** | |
* Customize the excerpt length and strip tags | |
*/ | |
function custom_excerpt ( $text ) { | |
global $post; |
This file contains hidden or 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 | |
// DO NOT INCLUDE OPENING PHP TAG AND PLACE INTO FUNCTIONS.PHP | |
/** | |
* Get Author's Gravatar profile data. | |
*/ | |
function custom_get_gravatar_profile() { | |
// Get author data | |
$author = strtolower( trim( get_the_author_meta( 'email' ) ) ); |
This file contains hidden or 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 | |
// DO NOT INCLUDE THE OPENING PHP TAG | |
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ |
This file contains hidden or 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
<h1>This is an H1</h1> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tu vero, inquam, ducas licet, si sequetur; Haec et tu ita posuisti, et verba vestra sunt. Atque his de rebus et splendida est eorum et illustris oratio. Eam stabilem appellas. Nam Pyrrho, Aristo, Erillus iam diu abiecti. Illa sunt similia: hebes acies est cuipiam oculorum, corpore alius senescit; Est enim effectrix multarum et magnarum voluptatum. Duo Reges: constructio interrete.<!--more--> | |
Fortasse id optimum, sed ubi illud: Plus semper voluptatis? Nihil enim hoc differt. Hoc enim constituto in philosophia constituta sunt omnia. Dat enim intervalla et relaxat. Aliena dixit in physicis nec ea ipsa, quae tibi probarentur; Tecum optime, deinde etiam cum mediocri amico. Ait enim se, si uratur, Quam hoc suave! dicturum. Respondent extrema primis, media utrisque, omnia omnibus. | |
<h2>This is an H2</h2> | |
Ita multo sanguine profuso in laetitia et in victoria est mortuus. Quae duo sunt, unum facit. Expectoque quid ad id, quod quaerebam, re |