Works pretty well in capturing the full URL when using this in a search (like in Sublime Text 2).
(https?|ftps?)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/?
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
ALTER DATABASE 'my_wp_database' CHARACTER SET utf8; | |
ALTER TABLE 'wp_comments' CHARACTER SET utf8; | |
alter table 'wp_comments' change comment_content comment_content LONGTEXT CHARACTER SET utf8; | |
alter table 'wp_comments' change comment_author comment_author LONGTEXT CHARACTER SET utf8; | |
update `wp_posts` set `post_content` = replace(`post_content` ,'á','á'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'é','é'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'í©','é'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'ó','ó'); |
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
User-agent: * | |
# Changing the /feed back to include the trailing slash since it otherwise blocks URLs like http://www.thesimpledollar.com/feeding-my-sweet-tooth-without-breaking-my-belly-or-breaking-the-bank/ | |
Disallow: /feed/ | |
Disallow: /cgi-bin | |
Disallow: /wp-admin | |
Disallow: /wp-content/cache | |
Disallow: /wp-includes | |
Disallow: /trackback | |
Disallow: /xmlrpc.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
/* =BEGIN: Add Class to first Paragraph in WordPress the_content(); | |
Source: http://wordpress.stackexchange.com/a/51682/28826 | |
---------------------------------------------------------------------------------------------------- */ | |
function first_paragraph($content){ | |
// Finding the 1st p tag and adding a class. | |
$content = preg_replace('%<p([^>]+)?>%', '<p$1 class="intro">', $content, 1); | |
// Finding the 1st closing p tag and adding a div tag to the rest of the content so we can separate it. | |
$content = preg_replace('%</p>%', '</p> <div id="collapsable-content">', $content, 1); |
Creating a solid base for your .htaccess
file. Currently includes RewriteBase, Security (against indexes, files, etc.), and Expires Headers (caching, performance).
- The URL REWRITES would go at the top of the file.
- The SECURITY and the WEB PERFORMANCE can go towards the bottom... before and WordPress or WP Super Cache items.
- UPDATE 2013-08-21: Added code for forcing either non-www or www. on URLs. Also added the MultiViews option.
- UPDATE 2013-08-23: Added specific code for
wp-config.php
- UPDATE 2013-10-04: Increased favicon expire time.
- UPDATE 2014-02-05: Removed the Force URL rewrites since there's more than one option.
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
/* =BEGIN: Check If Page Is Child | |
Source: http://bavotasan.com/2011/is_child-conditional-function-for-wordpress/ | |
---------------------------------------------------------------------------------------------------- */ | |
function is_child( $page_id_or_slug ) { // $page_id_or_slug = The ID of the page we're looking for pages underneath | |
global $post; // load details about this page | |
if ( !is_numeric( $page_id_or_slug ) ) { // Used this code to change a slug to an ID, but had to change is_int to is_numeric for it to work. | |
$page = get_page_by_path( $page_id_or_slug ); | |
$page_id_or_slug = $page->ID; | |
} |
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
/* =BEGIN: Only include Contact Form 7 javascript and CSS when needed | |
Source: http://fredrikmalmgren.com/only-include-contact-form-7-javascript-and-css-when-needed/ | |
---------------------------------------------------------------------------------------------------- */ | |
add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 100 ); | |
function deregister_cf7_javascript() { | |
if ( !is_page('contact') ) { | |
wp_deregister_script( 'contact-form-7' ); | |
} | |
} |
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 | |
$ig_post_custom_fields = array ( | |
"infographic" => array( | |
"name" => "is_infographic", | |
"std" => "", | |
"title" => "Is this an infographic post?", | |
"description" => "If you check this box, we'll add a Pin It share option.", | |
"type" => "checkbox"), | |
"image_url" => array( |
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 | |
$ig_post_custom_fields = array ( | |
"infographic" => array( | |
"name" => "is_infographic", | |
"std" => "", | |
"title" => "Is this an infographic post?", | |
"description" => "If you check this box, we'll add a Pin It share option.", | |
"type" => "checkbox"), | |
"image_url" => array( |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Color Scheme - Default/Railscasts.tmTheme", | |
"theme": "Phoenix Dark.sublime-theme", | |
"file_exclude_patterns": [ | |
".DS_Store", | |
"dump.rdb" | |
], | |
"folder_exclude_patterns": | |
[ | |
".svn", |