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: Pop Up Once | |
Plugin URI: https://gist.github.com/4394411 | |
Description: Quick plugin to create a modal popup form | |
Author: Aaron Brazell | |
Author URI: http://technosailor.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
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'bk_custom_loop' ); | |
function bk_custom_loop() { | |
global $paged; | |
$args = (array( | |
'paged' => $paged, | |
'posts_per_page' => 5 // accepts WP_Query args http://codex.wordpress.org/Class_Reference/WP_Query | |
)); |
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 | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'bk_grid_loop' ); | |
function bk_grid_loop() { | |
if ( function_exists( 'genesis_grid_loop' ) ) { | |
remove_action( 'genesis_before_post_content', 'generate_post_image', 5 ); | |
genesis_grid_loop( array( | |
'features' => 2, | |
'feature_image_size' => 'large', |
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
1. No, GPL code is not required to be offered publicly. | |
1a. If you distribute GPL code, you must include the source code (which, in WP world, is basically one and the same). Distribute basically means give/sell to the public. You are not required to give the program to anyone...only give the source code to those you give the program to. | |
2. Yes. (meant to include the link: http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowMoney (right to sell is always an option). You cannot, though, say "you can only use this on one site". You can sell the code, but can't limit how it is used. That's why "upgrades" are offered on a subscription or "support and automatic upgrades" offered. Technically, if you have a five-site upgrade subscription, you're allowed, under the GPL, to install it on a sixth. They have the ability to not enable an automatic download, but one you have one copy of GPL software, you can do with it as you will. | |
3. If you sell/distribute the code (meaning publicly), then the receiver has the righ |
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
.after-post .enews-widget input[type="submit"] { | |
width: auto; | |
display: block; | |
margin: auto; | |
} |
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
add_filter('protected_title_format', 'no_protected_prefix'); | |
function no_protected_prefix($title) { | |
return '%s'; | |
} |
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
add_filter('logout_url', 'logout_go_home', 10, 2); | |
function logout_go_home($logouturl, $redir) | |
{ | |
$redir = get_option('siteurl'); | |
return $logouturl . '&redirect_to=' . urlencode($redir); | |
} |
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
add_action( 'template_redirect', 'familytree_conditional_actions' ); | |
/** | |
* Switch out default Genesis post info creation for Family Tree version. | |
* | |
* @since 1.0 | |
*/ | |
function familytree_conditional_actions() { | |
if ( is_page_template( 'page_blog.php' ) || is_post_type_archive() || is_singular( 'post' ) || is_home() ) { | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); |
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
/** Filter Footer Crds */ | |
add_filter( 'genesis_footer_creds_text', 'kraft_footer_creds_text'); | |
function kraft_footer_creds_text() { | |
echo '<div class="creds"><p>'; | |
echo 'Copyright © '; | |
echo date(Y); | |
echo ' [client name] · Development by <a href="http://coffeaweb.com">Coffea Web Services.</a>'; | |
echo '</p></div>'; | |
} |
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 | |
$publication = get_post_meta($post->ID, 'publication', true); | |
if ($publication) { ?> | |
<div class="publication">Originally found in <?php echo $publication; ?></div> | |
<?php } |
OlderNewer