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 | |
/** | |
* @package WordPress | |
* @subpackage WP-Skeleton | |
*/ | |
// REMOVE SOME HEADER OUTPUT | |
function Wps_remove_header_info() { | |
remove_action('wp_head', 'rsd_link'); |
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 block botnet brute force with Mod_security | |
SecAction phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},initcol:user=%{REMOTE_ADDR},id:5000134 | |
<Locationmatch "/wp-login.php"> | |
# Setup brute force detection. | |
# React if block flag has been set. | |
SecRule user:bf_block "@gt 0" "deny,status:401,log,id:5000135,msg:'ip address blocked for 5 minutes, more than 10 login attempts in 3 minutes.'" | |
# Setup Tracking. On a successful login, a 302 redirect is performed, a 200 indicates login failed. | |
SecRule RESPONSE_STATUS "^302" "phase:5,t:none,nolog,pass,setvar:ip.bf_counter=0,id:5000136" | |
SecRule RESPONSE_STATUS "^200" "phase:5,chain,t:none,nolog,pass,setvar:ip.bf_counter=+1,deprecatevar:ip.bf_counter=1/180,id:5000137" |
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
/*Pixel straps start here*/ | |
/*Scroll hard for % straps*/ | |
.0{ width: 0px;} | |
.1{ width: 1px;} | |
.2{ width: 2px;} | |
.3{ width: 3px;} | |
.4{ width: 4px;} | |
.5{ width: 5px;} | |
.6{ width: 6px;} |
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 | |
$post_types= get_post_types('','names'); | |
$posts_separated = implode(",", $post_types); | |
$screens = array( 'post', 'page', $posts_separated); | |
foreach ($screens as $screen) { | |
add_meta_box( 'styles', 'hello', 'callback_func', $screen, 'advanced', 'high'); | |
} |
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 | |
//just load it the way WP does | |
include dirname(__FILE__) . '/wp-blog-header.php'; | |
require_once(ABSPATH . 'wp-admin/includes/admin.php'); | |
$functions = get_defined_functions(); | |
$i = 0; //count them | |
// set to user, we don't want internal functions |
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
<form id="wp-link" tabindex="-1" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 125px; max-height: none; height: auto;" _lpchecked="1"> | |
<input type="hidden" id="_ajax_linking_nonce" name="_ajax_linking_nonce" value="ab2ba583a6"> <div id="link-selector"> | |
<div id="link-options"> | |
<p class="howto">Enter the destination URL</p> | |
<div> | |
<label><span>URL</span><input id="url-field" type="text" name="href"></label> | |
</div> | |
<div> | |
<label><span>Title</span><input id="link-title-field" type="text" name="linktitle"></label> | |
</div> |
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
{ | |
"auto_complete_selector": "source, text", | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"drag_text": false, | |
"font_face": "Consolas", | |
"font_size": 13, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
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 | |
/** | |
* @package WordPress | |
* @subpackage WP-Skeleton | |
*/ | |
// REMOVE SOME HEADER OUTPUT | |
function Wps_remove_header_info() { | |
remove_action('wp_head', 'rsd_link'); |
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 | |
//get all ze hooks | |
$Directory = new RecursiveDirectoryIterator( 'WordPress\3.7' ); | |
$Iterator = new RecursiveIteratorIterator( $Directory ); | |
$regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH ); | |
foreach ( $regex as $filename=>$file ) { |
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 | |
//Load WorsPress quick and dirty into something not WordPress. This is horrible I know, | |
//But the database queries they are so low, and it's just so dirty | |
//install WordPress in a dir like /lib or something and stick classPageLoader.php in there, ha! | |
//Example use for a index.php or whatever, no autoloading here! | |
####################################################### | |
require('lib/classPageLoader.php'); | |
$content = new LoadWpContent(); |