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 | |
/** | |
* Plugin Name: PluginName | |
* Plugin URI: http://websiteurl | |
* Description: Description | |
* Version: 1.0 | |
* Author: Brian DiChiara | |
* Author URI: http://www.briandichiara.com | |
*/ |
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 | |
if(class_exists('Plugin')) return; | |
class Plugin { | |
var $debug = false; | |
var $admin_page = 'plugin'; | |
var $settings = array(); | |
var $errors = 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 | |
$alphabet = range('A','Z'); | |
$letters = array(); | |
while( $the_query->have_posts() ) : $the_query->the_post(); | |
$lname = get_post_meta(get_the_ID(), $prefix.'lname', true); | |
$first = strtoupper(substr(trim($lname), 0, 1)); | |
if($first && !in_array($first, $letters)){ | |
$letters[] = $first; | |
} | |
endwhile; |
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 | |
$start_section = array(); | |
$my_section = array(); | |
$end_section = array(); | |
$started = false; | |
foreach ($arr as $item) { | |
if (strpos($item, '?param=my_val') !== false) { | |
$my_section[] = $item; | |
$started = 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 | |
// ... | |
/* Line 91 */ | |
public static function filter_loops($content){ | |
global $current_user; | |
//Get plugin options | |
$dbOpts = get_option('contexture_ps_options'); |
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_shortcode('get-page', 'mytheme_get_page'); | |
function mytheme_get_page($atts=array(), $content=NULL){ | |
extract(shortcode_atts(array( | |
'page' => NULL | |
), $atts)); | |
if(!$page){ | |
return ''; | |
} |
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 | |
/** | |
* Plugin Name: Delete Them All! | |
* Plugin URI: http://infomedia.com | |
* Description: Delete ALL posts and associated data, leaving your database nice and clean! | |
* Version: 1.0 | |
* Author: Brian DiChiara | |
* Author URI: http://www.briandichiara.com | |
*/ |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html" /> | |
<meta name="author" content="Brian DiChiara" /> | |
<title>Launching...</title> | |
<style type="text/css"> | |
* { margin:0; padding:0; } | |
body, html, .container { background:#2f2f2f; } | |
p { margin:100px auto; text-align:center; font-size:0; width:373px; height:29px; background:url(http://assets.infomedia.net/launching.gif) no-repeat 50% 50%; } |
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
$prefix = hybrid_get_prefix(); | |
add_filter( "{$prefix}_byline", 'wwon_byline'); | |
function wwon_byline($byline){ | |
if(!is_single()){ | |
$byline = '<div class="post-date"> | |
<span class="post-date-month">'.get_the_date('M').'</span> | |
<span class="post-date-day">'.get_the_date('d').'</span> | |
</div> |
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 | |
class Tribe_Image_Widget extends WP_Widget { | |
// ... | |
private function get_image_html( $instance, $include_link = true ) { | |
// Backwards compatible image display. | |
if ( $instance['attachment_id'] == 0 && $instance['image'] > 0 ) { |
OlderNewer