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
/** | |
* Disable new user registration emails sent to the site admin | |
*/ | |
function disable_registration_email_filter($result = '') { | |
extract($result); | |
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); | |
if (strstr(sprintf(__('[%s] New User Registration'), $blogname), $subject)) { | |
$to = ''; | |
$subject = ''; | |
$message = ''; |
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
<span class="at">|</span> <span class="format">{</span> | |
|<span class="selector">|</span> <span class="format">{</span> | |
| <span class="property">|</span> <span class="value">|</span><span class="format">;</span> | |
|<span class="format">}</span>| | |
| | |
<span class="format">}</span> | |
||<span class="comment">|</span> | |
| |
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
// External links new window | |
$("a[href*='http://']:not([href*='"+location.hostname.replace | |
("www.","")+"'])").attr('target','_blank'); | |
// rel=external new window | |
$("a[rel='external']").attr('target','_blank'); |
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
# Turn on rewrite | |
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On | |
# RewriteBase / | |
</IfModule> | |
# rewrite olddomain.com → newdomain.com | |
<IfModule mod_rewrite.c> | |
RewriteCond %{HTTPS} !=on |
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
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
/* ============================================================================= | |
WordPress WYSIWYG Editor Styles | |
========================================================================== */ | |
.entry-content img { | |
margin: 0 0 1.5em 0; | |
max-width: 100%; | |
height: auto; | |
} | |
.alignleft, img.alignleft { |
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
# Chmod all files and directories | |
find . -type d -print0 | xargs -0 chmod 0755 | |
find . -type f -print0 | xargs -0 chmod 0644 | |
# run command as another user | |
sudo -u USER -H COMMAND | |
# find and remove files | |
find . -type f -name "FILE-TO-FIND" -exec rm -f {} \; |
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
/* Delete duplicate posts */ | |
DELETE bad_rows.* | |
from wp_posts as bad_rows | |
inner join ( | |
select post_title, MIN(id) as min_id | |
from wp_posts | |
group by post_title | |
having count(*) > 1 | |
) as good_rows on good_rows.post_title = bad_rows.post_title | |
and good_rows.min_id <> bad_rows.id |
NewerOlder