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 | |
| /* | |
| * Get all users registered after $start and before $end (dates in yyyy-mm-dd format) | |
| * | |
| * Based on my answer to this question: http://wordpress.stackexchange.com/questions/51485/how-can-i-query-all-users-who-registered-today/51492#51492 | |
| * | |
| * @param (string) $start - start date in yyyy-mm-dd format | |
| * @param (string) $end - end date in yyyy-mm-dd format | |
| */ | |
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( $, obj ) { | |
| var uno = function( e ) { | |
| e.preventDefault(); | |
| var $this = $( this ); | |
| $.ajax( { | |
| type: "POST", | |
| url: obj.ajaxurl | |
| + "?action=" + obj.action |
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 | |
| /** | |
| * Is the current page a descendent of page identified by the path (not slug). | |
| * A page is not a descendent of itself! | |
| * @link http://wordpress.stackexchange.com/questions/101213/does-is-child-exist-in-wp-3-5-1 | |
| * @param string $page_path The path of the page, e.g. mypage/mysubpage | |
| * @return boolean True if current page is a descednent of specified $page_path. False otherwise. | |
| */ | |
| function is_descendent_of( $page_path ){ |
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 | |
| /** | |
| * Returns a term IDs of terms that are associated with a post, and who have | |
| * child terms also associated with the post. | |
| * | |
| * Please note, 'parent' is a slight misnomer. If you have category structure: | |
| * Cat A > Sub-Cat B > Sub-Sub-Cat C | |
| * and a post belongs to A and B, but not C. 'B' is not considered a parent term | |
| * for this 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 | |
| /** | |
| * An implementation of the AES cipher (CBC mode). | |
| * For reference http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf | |
| * | |
| * @author Stephen Harris ([email protected]) | |
| * @license GPL | |
| * | |
| * Example usage: |
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 | |
| /** | |
| * A really simple method of dealing with brute-force attacks. | |
| * This is not about securing yourself from these attacks - it's stopping them wasting your | |
| * server resources when they patently won't work. | |
| * | |
| * Put this at the very top of your wp-config.php. Add other banned usernames as desired. | |
| * You may wish to prevent users from registering them. | |
| */ |
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 | |
| function myprefix_kses_allowed_tags($input){ | |
| return array_merge( $input, array( | |
| // paragraphs | |
| 'p' => array( | |
| 'style' => array() | |
| ), | |
| 'span' => array( | |
| 'style' => array() | |
| ), |
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 | |
| /** | |
| * Registers the directory "[child-theme-dir]/event-organiser" as a template location for | |
| * Event Organiser. EO will look there when looking for the plug-in template files (e.g. single-event.php, archive-event.php, etc ) | |
| * | |
| */ | |
| function mytheme_register_eventorganiser_stack( $stacks ){ | |
| //$stacks is an array of (absolute) directory paths. EO will look in the order | |
| //in which they appear in the array |
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
| /** | |
| * This should be added to your theme's style.css | |
| */ | |
| .eo-events-widget{ font-size: 14px } | |
| .eo-events-widget li{ overflow:hidden;} | |
| .eo-events .eo-date-container{ color:white;float:left;;text-align: center;width: 35px;line-height: 1.3; margin:0px 5px; } | |
| .eo-events .eo-date-month{ margin: 0px;display: block;font-size: 14px;font-variant: small-caps;color: white;letter-spacing: 3.2px;text-align: center;} | |
| .eo-events .eo-date-day{ display: block;margin: 0px;border: none;font-size: 20px; } | |
| .eo-events .eo-date-container{ background: #1e8cbe} | |
| .eo-events .eo-date-day{ background: #78c8e6} |