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
| $post_classes = get_post_class(); | |
| $odd_or_even = 'even'; | |
| $post_counter = 0; | |
| $post_counter++; | |
| $odd_or_even = ( 'odd' == $odd_or_even ) ? 'even' : 'odd'; | |
| $post_classes[] = ( $post_counter == count( $posts ) ) ? 'last-post' :$odd_or_even; | |
| echo '<div class="' . implode( ' ', $post_classes ) . '">'; |
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
| if ( ! empty( $instance['show_content'] ) ) { | |
| if ( 'excerpt' == $instance['show_content'] ) | |
| the_excerpt(); | |
| elseif ( 'content-limit' == $instance['show_content'] && strip_shortcodes( get_the_content() ) != '' ) | |
| the_content_limit( (int) $instance['content_limit'], esc_html( $instance['more_text'] ) ); | |
| else | |
| the_content( esc_html( $instance['more_text'] ) ); | |
| } |
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
| jQuery(document).ready(function($){ | |
| // Mobile navigation | |
| $('#prim-selector, #sec-selector').change(function(){ | |
| if ($(this).val()!='') { | |
| window.location.href=$(this).val(); | |
| } | |
| }); | |
| }); |
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 | |
| /** | |
| * Add "Email Us" link to footer | |
| * | |
| * @author Bill Erickson | |
| * @author Travis Smith (modified) | |
| * @link http://www.billerickson.net/overriding-options-and-meta | |
| */ | |
| function be_email_us() { |
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( 'admin_init', 'wps_hide_editor' ); | |
| /** | |
| * Remove the editor for a specific post. | |
| * | |
| * @return null Returns early for non-admin and other admin pages. | |
| */ | |
| function wps_hide_editor() { | |
| $post_id = isset( $_GET['post'] ) ? $_GET['post'] : $_POST['post_ID'] ; | |
| if( ! isset( $post_id ) || ! is_admin() ) return; |
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
| phpcs.standard = WordPress | |
| phpcs.tabWidth = 4 | |
| phpcs.encoding = utf-8 | |
| ftp.host = ftp.example.com | |
| ftp.port = 21 | |
| ftp.username = username | |
| ftp.password = password | |
| ftp.project.dir = /subdomains/docs/httpdocs/${project.name.safe} | |
| ftp.dir = ${ftp.project.dir}/${project.version} |
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
| -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ | |
| -moz-box-sizing: border-box; /* Firefox, other Gecko */ | |
| box-sizing: border-box; /* Opera/IE 8+ */ |
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 private/draft/future/pending pages to parent dropdown in page attributes metabox and Quick Edit | |
| * | |
| * @param array $dropdown_args | |
| * @param object $post (Optional) | |
| * @return array $dropdown_args | |
| */ | |
| function page_attributes_metabox_add_parents( $dropdown_args, $post = NULL ) { | |
| $dropdown_args['post_status'] = array('publish', 'draft', 'pending', 'future', 'private'); | |
| return $dropdown_args; |
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 | |
| /** | |
| * Possibly amend the loop. | |
| * | |
| * Specify the conditions under which the grid loop should be used. | |
| * | |
| * @author Bill Erickson | |
| * @author Gary Jones | |
| * @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ |
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( 'wp_enqueue_scripts', 'child_load_google_font' ); | |
| /** | |
| * Enqueue Google Font | |
| * | |
| * @author Greg Rickaby | |
| * @since 1.0 | |
| */ | |
| function child_load_google_font() { | |
| $protocol = is_ssl() ? 'https' : 'http'; |
OlderNewer