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
/** | |
* | |
* Helper for the Cheezcap config array. | |
* | |
* Loops through the terms and categories on the site and creates Cheezcap options for them. | |
* | |
* Used to create Cheezcap options per category/taxonomy | |
* | |
* @param type $term | |
* @param type $slug |
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 | |
public function get_by_fbid( $fbid ) { | |
$where = "fbid = {$fbid} AND DATE_FORMAT(date_modified, \"%Y-%m-%d\") = CURDATE()"; | |
$this->db->select( 'id' ) | |
->from( 'entries' ) | |
->where( $where ); | |
$query = $this->db->get(); |
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 text in files recursively and only display the file name | |
grep -H -r "search term" /filepath | cut -d: -f1 | |
# Search in file for term and color them in result | |
egrep -iw --color=auto 'user|group' /etc/httpd/conf/http |
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 | |
/** | |
* | |
* Gets media attached to a post | |
* | |
* | |
* @global type $post | |
* @param type $post_id | |
* @return type array | |
* @todo revise method to be more flexible |
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 | |
/** | |
* | |
* Gets the URL to a media item based on the media item's name (slug) | |
* | |
* | |
* @param type $slug | |
* @return type | |
* | |
* |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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 | |
$the_dir = "/var/www/foo/bar/includes/"; | |
foreach ( glob( $the_dir . '*.php' ) as $file ) | |
{ | |
require_once $file; | |
} |
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 get_wpml_home_ids(){ | |
//Globalizse the $wpdb variable (instantiation of the wpdb class) | |
global $wpdb; | |
//Get the front-page id from the options table | |
$home_id = get_option('page_on_front'); | |
//Run the query |
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
https://www.facebook.com/dialog/pagetab?app_id=APP_ID&next=APP_HOSTED_URL |
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="fb-root"></div> | |
<script type="text/javascript" src="//connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
FB.init({ | |
appId: 'APPID', // App ID | |
channelUrl: '//example.com/channel.html', // Channel File | |
status: true, | |
cookie: true, | |
xfbml: true | |
}); |
OlderNewer