This file contains hidden or 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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
.nav { | |
width: 100%; | |
ul { | |
background: #ddd; | |
li { |
This file contains hidden or 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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
$green: #063C22; | |
a { | |
color: $green; | |
} |
This file contains hidden or 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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
@mixin border-radius($radius) { | |
-webkit-border-radius: $radius; | |
-moz-border-radius: $radius; | |
-ms-border-radius: $radius; | |
border-radius: $radius; |
This file contains hidden or 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
register_activation_hook( __FILE__, 'endo_create_custom_table' ); | |
function endo_create_custom_table() { | |
global $wpdb; | |
$table_name = $wpdb->prefix . "custom_table"; | |
$sql = "CREATE TABLE $table_name( | |
id mediumint(9) NOT NULL AUTO_INCREMENT, |
This file contains hidden or 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
add_action('gform_after_submission', 'endo_add_entry_to_db', 10, 2); | |
function endo_add_entry_to_db($entry, $form) { | |
// uncomment to see the entry object | |
// echo '<pre>'; | |
// var_dump($entry); | |
// echo '</pre>'; | |
$source = $entry['source_url']; | |
This file contains hidden or 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
[one_third]<img src="http://localhost:8888/dev/wp-content/uploads/2014/09/40-fort-1-300x240.png" alt="40-fort-1" width="300" height="240" class="alignnone size-medium wp-image-1425" /> | |
<h3>40 In the Fort</h3> | |
A 40 mile mountain bike race in Fort Collins, CO.[/one_third] | |
[one_third]<img src="http://localhost:8888/dev/wp-content/uploads/2014/09/rrrr-300x300.jpg" alt="rrrr" width="300" height="300" class="alignnone size-medium wp-image-1428" /> | |
<h3>Red River Roadkill Rally</h3> | |
A 60 mile road bike tour in Ardmore, OK.[/one_third] | |
[one_third_last]<img src="http://localhost:8888/dev/wp-content/uploads/2014/09/denver-century-team-young-life-300x267.jpg" alt="denver-century-team-young-life" width="300" height="267" class="alignnone size-medium wp-image-1426" /> | |
<h3>Denver Century</h3> |
This file contains hidden or 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 my_search_filter($query) { | |
if ( !is_admin() && $query->is_main_query() ) { | |
if ($query->is_search) { | |
$query->set('post_type', array( 'post', 'article' ) ); | |
} | |
} | |
} | |
add_action('pre_get_posts','my_search_filter'); |
This file contains hidden or 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 issuem_post_author_archive( &$query ) | |
{ | |
if ( $query->is_author ) | |
$query->set( 'post_type', 'article' ); | |
remove_action( 'pre_get_posts', 'issuem_post_author_archive' ); // run once! | |
} | |
add_action( 'pre_get_posts', 'issuem_post_author_archive' ); |
This file contains hidden or 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
UPDATE wp_options SET option_value = replace(option_value, 'http://devsite.com', 'http://livesite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://devsite.com','http://livesite.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://devsite.com', 'http://livesite.com'); |
This file contains hidden or 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
// remove admin bar from free users | |
add_action('after_setup_theme', 'remove_admin_bar'); | |
function remove_admin_bar() { | |
if (!current_user_can('administrator') && !is_admin()) { | |
show_admin_bar(false); | |
} | |
} | |
// don't allow users to access WordPress admin | |
add_action('admin_init', 'no_mo_dashboard'); |
OlderNewer