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
enum Router: URLRequestConvertible { | |
static let baseURLString = "http://dev.example.com" | |
static var OAuthToken: String? | |
case MapView(Int) | |
case PhotoInfo(Int, ImageSize) | |
case Comments(Int, Int) | |
var URLRequest: NSURLRequest { | |
let (path: String, parameters: [String: AnyObject]) = { |
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 | |
/* | |
Template Name: MaxDebug | |
*/ | |
// Get WP | |
include_once"wp-config.php"; | |
include_once"wp-load.php"; | |
include_once"wp-includes/wp-db.php"; | |
//Connect To Old Database | |
$oldbros = new wpdb('root','Catalin@2040','sqlbros','localhost'); |
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 | |
/* Post URLs to IDs function, supports custom post types - borrowed and modified from url_to_postid() in wp-includes/rewrite.php */ | |
function bwp_url_to_postid($url) | |
{ | |
global $wp_rewrite; | |
$url = apply_filters('url_to_postid', $url); | |
// First, check to see if there is a 'p=N' or 'page_id=N' to match against | |
if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) ) { |
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
# Header Buffering | |
php_flag output_buffering on |
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
<div id="list123"> | |
<?php | |
// List posts by the terms for a custom taxonomy of any post type | |
$post_type = 'YOUR_POST_TYPE'; | |
$tax = 'YOUR_TAXONOMY'; | |
$tax_terms = get_terms( $tax ); | |
if ($tax_terms) { |
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
find . -name "*.php" -type f -exec sed -i '/eval(base64_decode(/d' {} \; |
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
This is a test |