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
public partial class Leaders : System.Web.UI.Page { | |
private int rank = 0; // Rank of the current record in GridView | |
private int currentPage = 0; // tracks current page in GridView | |
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { | |
// Find label control to update | |
Label lblRank = (Label)e.Row.FindControl("lblRank"); | |
// On page reload, rank is reset to 0 | |
if (rank == 0) { |
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: Speak Pirate | |
* Plugin URI: | |
* Description: translates text in a shortcode into the equivalent text spoken as a pirate | |
* Author: ericjuden | |
* Author URI: http://ericjuden.com | |
* Version: 1.0 | |
*/ | |
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: My Object-Oriented Plugin | |
* Plugin URI: Plugin Website Here | |
* Description: Your Description Here | |
* Author: Your Name Here | |
* Author URI: Your Website Here | |
* Version: 1.0 | |
*/ | |
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('customize_register', 'my_customize_register'); | |
function my_customize_register($wp_customize){ | |
require_once(TEMPLATEPATH . '/class/wp_customizer_taxonomy_dropdown.php'); | |
$wp_customize->add_section('my_theme_blog_featured_categories', array( | |
'title' => __('Blog: Featured Categories'), | |
'priority' => 36, | |
)); |
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 My_Plugin_Options { | |
var $options; | |
var $option_name; | |
var $is_site_option; // Are we using Multisite and saving to global options? | |
function My_Plugin_Options($option_name, $is_site_options = false){ | |
$this->option_name = $option_name; | |
$this->is_site_option = $is_site_options; | |
if($this->is_site_option){ |
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 | |
global $wpdb; | |
// Clean SQL before running | |
$sql = $wpdb->prepare('SELECT * FROM ' . $wpdb->posts . ' WHERE status = %s AND post_type = %s', 'publish', 'page'); | |
// Return results | |
$results = $wpdb->get_results($sql); | |
?> |
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 a new record in a table | |
global $wpdb; | |
// data to be added | |
$data = array( | |
'post_title' => __('This is a test'), | |
'post_content' => __('This is really long text'), | |
'post_status' => __('draft') |
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: Create Sample Tables Plugin | |
Plugin URI: http://ericjuden.com | |
Description: Create some dummy tables | |
Version: 1.0 | |
Author: ericjuden | |
Author URI: http://ericjuden.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
/******************************************************** | |
* Main Body Styles | |
********************************************************/ | |
/******************************************************** | |
* Header Styles | |
********************************************************/ | |
OlderNewer