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 pw_edd_disable_single_use( $return, $code, $email ) { | |
| return false; | |
| } | |
| add_filter( 'edd_is_discount_used', 'pw_edd_disable_single_use', 10, 3 ); |
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 pw_remove_downloads_from_search( $query ) { | |
| if( $query->is_search() && $query->is_main_query() ) { | |
| $query->set('post_type', array( 'page', 'post'' ) ); // add any other post types you want to include | |
| } | |
| } | |
| add_action( 'pre_get_posts', 'pw_remove_downloads_from_search' ); |
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 pw_edd_change_download_cap( $args ) { | |
| $args['capability_type'] = 'page'; | |
| return $args; | |
| } | |
| add_filter( 'edd_download_post_type_args', 'pw_edd_change_download_cap' ); |
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 | |
| # | |
| # rt-theme loop | |
| # | |
| global $args,$content_width,$paged; | |
| add_filter('excerpt_more', 'no_excerpt_more'); | |
| //varialbles | |
| $video_width = ($content_width =="960") ? 940 : 606; |
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 jc_paged_posts_columns() { | |
| echo '<div id="paged-columns">'; | |
| global $post; | |
| $numposts = 11; | |
| $args = array( 'numberposts' => $numposts, 'offset' => 10 ); | |
| $column1 = get_posts( $args ); | |
| echo '<ul class="column-list">'; | |
| echo '<li class="column-heading">Page 2</li><ol>'; | |
| foreach ( $column1 as $post ) : setup_postdata($post); ?> | |
| <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> |
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: Newton Police PHP to Access | |
| Description: Inserts form data from the website into the access databases | |
| Author: Pippin Williamson | |
| Version: 1.0 | |
| */ | |
| function test_db() { |
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
| /* | |
| * Gets the excerpt of a specific post ID or object | |
| * @param - $post - object/int - the ID or object of the post to get the excerpt of | |
| * @param - $length - int - the length of the excerpt in words | |
| * @param - $tags - string - the allowed HTML tags. These will not be stripped out | |
| * @param - $extra - string - text to append to the end of the excerpt | |
| */ | |
| function rcp_excerpt_by_id($post, $length = 50, $tags = '<a><em><strong><blockquote><ul><ol><li><p>', $extra = ' . . .') { | |
| if(is_int($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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Default_Theme | |
| */ | |
| get_header(); ?> | |
| <div class="container" id="main-content"> | |
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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Default_Theme | |
| */ | |
| get_header(); ?> | |
| <div class="container" id="main-content"> | |
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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Default_Theme | |
| */ | |
| get_header(); ?> | |
| <div class="container" id="main-content"> | |