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
App = function(){ | |
/* private */ | |
var default_topic = 'Placeholder Text'; | |
/* HTML5 elememt support tester */ | |
var element_supports_attribute = function(element,attribute){ | |
var test = document.createElement(element); | |
if (attribute in test) { | |
return 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 | |
global $input_state_province, $input_required, $selected_state; | |
?> | |
<label class="unitx1"><?php _e('State'); ?> <?php if($input_required) : echo '*'; endif; ?> | |
<select id="<?php echo esc_attr($input_state_province); ?>" name="<?php echo esc_attr($input_state_province); ?>" class="<?php if($input_state_province) : echo 'required'; endif; ?>"> | |
<option value=""<?php if($selected_state==='') : echo ' selected="selected"'; endif; ?>><?php _e('Please Select'); ?></option> | |
<option value="AL"<?php if($selected_state==='AL') : echo ' selected="selected"'; endif; ?>><?php _e('AL'); ?></option> | |
<option value="AK"<?php if($selected_state==='AK') : echo ' selected="selected"'; endif; ?>><?php _e('AK'); ?></option> | |
<option value="AZ"<?php if($selected_state==='AZ') : echo ' selected="selected"'; endif; ?>><?php _e('AZ'); ?></option> | |
<option value="AR"<?php if($selected_state==='AR') : echo ' selected="selected"'; endif; ?>><?php _e('AR'); ?></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
default_run_options[:pty] = true # Must be set for the password prompt from git to work | |
set :domain, "your-domain.com" | |
set :user, "your-user" | |
set :application, "your-app" | |
set :repository, "your-repo" | |
set :branch, "master" | |
set :scm, :git | |
# Tell Capistrano to use agent forwarding with this command. uses your local keys instead of keys installed on the server. |
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
/** | |
* 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 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 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_show_admin_bar function. | |
* Filter to control which users see the admin bar. | |
* @access public | |
* @return false or true if user is admin. | |
*/ | |
function mm_show_admin_bar() { | |
if (current_user_can('administrator')) { | |
return true; | |
} else { |
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
/** | |
* truncate_words function to truncate a string of words to a specified number of words | |
* @param string $str The text string to split | |
* @param integer $words The number of words to extract. Defaults to 15 | |
*/ | |
function truncate_words( $str, $words = 15 ) | |
{ | |
$arr = preg_split( '/[\s]+/', $str, $words+1 ); | |
$arr = array_slice( $arr, 0, $words ); | |
return join( ' ', $arr ) . '…'; |
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 | |
/** | |
* Handles display of 404 page. | |
* | |
* This file requires the creation of a page with the slug 'page-not-found' | |
*/ | |
function jb_page_404(){ | |
genesis_custom_loop( array('pagename' => 'page-not-found', 'posts_per_page' => 1 ) ); | |
} |
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
DROP TABLE %filltext:name=prefix:default=wp:width=6%_commentmeta; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_comments; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_links; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_options; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_postmeta; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_posts; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_term_relationships; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_term_taxonomy; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_terms; | |
DROP TABLE %filltext:name=prefix:default=wp:width=6%_usermeta; |
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
// text-size-adjust | |
//------------------------------------------------ | |
// | |
// Values: none (default), auto, 100% | |
// | |
// Reference: | |
// https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust | |
// |
OlderNewer