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 | |
add_action ( 'admin_menu', 'rkv_edit_admin_page_link_default' ); | |
function rkv_edit_admin_page_link_default() { | |
// call global submenu item | |
global $submenu; | |
// edit main link for posts | |
$submenu['edit.php'][5][2] = 'edit.php?post_status=publish'; |
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 | |
function rkv_bypass_auto_update_email( $send, $type, $core_update, $result ) { | |
// check our type and bail if successful | |
if ( ! empty( $type ) && $type == 'success' ) { | |
return false; | |
} | |
// return the send function | |
return true; |
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 | |
/** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.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
<?php | |
add_filter( 'searchwp_license_key', function(){ | |
return 'MJqNKfmhT3gVG6kpeyjXvM'; // your license key (found on your payment receipt) | |
}); |
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 | |
/** | |
* Adding all Asynchronous Javascripts to posts and pages | |
*/ | |
function add_bulk_async_sdk() { ?> | |
<script> | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], | |
add = function(url, 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
#!/bin/bash | |
find /var/www/public -type d -exec chmod 755 {} + | |
find /var/www/public -type f -exec chmod 644 {} + | |
chown -R www-data:www-data /var/www/public |
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 | |
//create our mega query with post data, meta fields, and taxonomies | |
function get_posts_terms_fields($params=null){ | |
global $wpdb; | |
$defaults=array( | |
'posts_per_page' => 5, | |
'offset' => 0, | |
'category' => '', | |
'category_name' => '', |
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 | |
/** | |
* @package Hello_Dolly_OOP | |
* @version 0.1 | |
*/ | |
/* | |
Plugin Name: Hello Dolly OOP | |
Plugin URI: http://kernelcurry.com/blog/object-oriented-wordpress-plugin | |
Description: This plugin is an object oriented version of Matt Mullenweg's Hello Dolly plugin. | |
Version: 0.1 |
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
{ | |
"total_number_of_results": 47300000, | |
"blog_posts": false, | |
"video_packs": [ | |
33 | |
], | |
"invalid_term": false, | |
"integrated_places": false, | |
"rank_date": "2012-03-06", | |
"data_center": "us", |
OlderNewer