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
| /** | |
| * Filter to modify the returned data from Display Eventbrite | |
| * to take the day of the start date and apply it to teh end of teh last day of | |
| * multi day events | |
| * | |
| * So the event appears as a single bookable entry in calendar layouts | |
| * | |
| */ | |
| add_filter( | |
| 'wfea_api_results', // hook to filter returned event data before display |
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_shortcode( 'my_filter', function ( $atts ) { | |
| ob_start(); | |
| ?> | |
| <form method="get"> | |
| <select name="category_name"> | |
| <option value="name1">Name1</option> | |
| <option value="name2">Name2</option> | |
| </select> | |
| <input type="submit" value="Filter"> |
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
| $url = "https://v3.openstates.org/jurisdictions'; | |
| $args = array( | |
| 'headers' => array ( | |
| 'X-API-KEY' => 'your api key here' | |
| ), | |
| ); | |
| $response = wp_remote_get( $url, $args ); | |
| $response_code = wp_remote_retrieve_response_code( $response ); | |
| if ( 200 != $response_code ) { |
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: IPN Debug | |
| */ | |
| add_action( 'template_redirect', 'test_qem_ipn' ); | |
| function test_qem_ipn() { | |
| global $qem_fs; | |
| if ( ! isset ( $_GET['test_qem_ipn'] ) ) { | |
| 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
| function get_ip( $ipaddress = null ) { | |
| if ( ! empty( $ipaddress ) ) { | |
| if ( false === WP_Http::is_ip_address( $ipaddress ) ) { | |
| return '0.0.0.0'; | |
| } | |
| return $ipaddress; | |
| } | |
| $ipaddress = '0.0.0.0'; | |
| if ( getenv( 'HTTP_CF_CONNECTING_IP' ) ) { |
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_filter( ‘eawp_excerpt’, function($content) { | |
| return the_content(); | |
| }, 10,1); |
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: Custom Exceprt Filter | |
| * Description: Custom Excerpt Filter for Display Eventbrite | |
| * Version: 1.0 | |
| */ | |
| // just a check to make sure no hacker tries this file | |
| if ( ! defined('ABSPATH') ) { | |
| die(); | |
| } |
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: My Custom Code Snippets | |
| * Description: Change the description and version as needed | |
| * Version: 1.0 | |
| */ | |
| // just a check to make sure no hacker tries this file | |
| if ( ! defined('ABSPATH') ) { | |
| die(); | |
| } |
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
| ini_set('display_errors','Off'); | |
| ini_set('error_reporting', E_ALL ); | |
| define('WP_DEBUG', false); | |
| define('WP_DEBUG_DISPLAY', false); |
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
| <input type='text' id='ajaxwfeafilter'><button id='ajaxwfeasearch'>Search</button> | |
| <hr> | |
| <div id='ajaxwfea'></div> |