# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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 | |
/** | |
* | |
* ---------------------------------------------- | |
* HTML to JSON | |
* ---------------------------------------------- | |
* | |
* [Currently used in Wordpress to output HTML into a Google Maps InfoWindow correctly] | |
* |
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
/** | |
*Navigation overrides | |
*/ | |
.navbar a.btn-warning.pull-left { | |
margin-top: 18px; | |
} | |
.navbar .nav { | |
margin-top: 14px; |
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 | |
/** | |
* WordPress WP_User_Query Comprehensive Reference | |
* Compiled by wpsmith - wpsmith.net | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_User_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/user.php | |
*/ | |
$args = array( |
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
/** | |
* mm_register function. | |
* Register a new user. | |
* @access public | |
* @return User errors or user is logged in. | |
*/ | |
function mm_register() { | |
if(!is_user_logged_in()) { | |
if(!empty($_POST)) { |
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
/** | |
* mm_sign_in function. | |
* Sign the user in | |
* @access public | |
* @return User errors or true if successful signon | |
*/ | |
function mm_sign_in() { | |
if(!is_user_logged_in()) { | |
if(!empty($_POST)) { | |
// verify nonce |
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 | |
/* | |
Plugin Name: Custom Login Error | |
Plugin URI: http://www.thoughtrefinery.com/ | |
Description: Customize error messages on login form | |
Version: 0.1 | |
Author: Nick Ciske | Thought Refinery | |
Author URI: http://www.thoughtrefinery.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
<?php | |
global $user_identity; | |
//$user_submissions = get_posts(); | |
if ($user = wp_get_current_user()) { | |
$author = array('id' => $user->ID); | |
} else { | |
$commenter = wp_get_current_commenter(); | |
$author = array( | |
'author' => $commenter['comment_author'], |
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
function wp_welcome_panel() { | |
global $wp_version; | |
if ( ! current_user_can( 'edit_theme_options' ) ) | |
return; | |
$classes = 'welcome-panel'; | |
$option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); | |
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner |