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
$nationals = array( | |
'Afghan', | |
'Albanian', | |
'Algerian', | |
'American', | |
'Andorran', | |
'Angolan', | |
'Antiguans', | |
'Argentinean', | |
'Armenian', |
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_users` SET `user_pass` = MD5( 'new_password_here' ) WHERE `wp_users`.`user_login` = "admin_username"; |
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: "Hide Admin Bar"-Button | |
* Plugin URI: http://unserkaiser.com | |
* Description: Easier debugging when the error message is hidden behind the admin bar. | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
*/ | |
// Prevent loading this file directly - Busted! |
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: Breadcrumb Functions | |
Description: Functions for displaying breadcrumbs when working with hierarchical post types. Does nothing out-of-the-box, functions must be added to theme (directly or via hooks, your discretion). | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com/ | |
*/ | |
/* | |
Basic: | |
echo get_breadcrumbs( $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
<?php | |
/* | |
* Plugin Name: Root-based Taxonomy URLs for WordPress | |
* Description: Enables root-based Taxonomy URLs, i.e. Makes /taxonomy/my-taxonomy/ URLs route as /my-taxonomy/ | |
* Author: Mike Schinkel | |
* Author URI: http://about.me/mikeschinkel | |
* Plugin URI: https://gist.github.com/1421235 | |
* Version: 0.1 | |
* License: GPL 2+ | |
* Notes: Must use register_root_based_taxonomy_url( $taxonomy[, $priority] ) in an 'init' hook to specify root_based taxonomy. |
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
$(document).scroll(function(e) { | |
var nav = $('nav'), | |
page = $('body'), | |
scrollValue = page[0].offsetTop - window.pageYOffset; | |
if(scrollValue < -20 ) { | |
nav.addClass('scrolled'); | |
} | |
else { | |
nav.removeClass('scrolled'); |
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 | |
//Use this function to create pagingation links that are styleable with Twitter Bootstrap | |
function paging() { | |
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1){ | |
$current_page = max(1, get_query_var('paged')); |
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
<ul class="feed events"> | |
<?php | |
global $post; | |
$args = array( | |
'numberposts' => 3, | |
'category' => 3, | |
'meta_key' => 'event_date', | |
'meta_value' => date("Y-m-d"), | |
'meta_compare' => '>=', | |
'orderby' => 'meta_value', |
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: Registration Redirect | |
Description: Don't allow people to view the default registration page | |
Author: Christopher Davis | |
Author URI: http://christopherdavis.me | |
License: GPL2 | |
*/ | |
add_action( 'login_form_register', 'wpse45134_catch_register' ); |