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 | |
| require_once getenv( 'WP_TESTS_DIR' ) . '/includes/functions.php'; | |
| function _install_and_load_liveblog() { | |
| require dirname( __FILE__ ) . '/../liveblog.php'; | |
| } | |
| tests_add_filter( 'muplugins_loaded', '_install_and_load_liveblog' ); | |
| require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php'; |
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
| Object Caching: APC / Memcached | |
| Page Caching: Batcache | |
| APC: http://wordpress.org/extend/plugins/apc/ | |
| Memcached: http://wordpress.org/extend/plugins/memcached/ | |
| Batcache: http://wordpress.org/extend/plugins/batcache/ | |
| Remember, these require server-side components or libraries; ask your host for advice before installing these plugins if you're not sure. |
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('h1.widget-title').each(function(i) { | |
| var new_heading = jQuery('<h3></h3>').append(jQuery(this).contents()); | |
| new_heading.attr('id', jQuery(this).attr('id')); | |
| new_heading.attr('class', jQuery(this).attr('class')); | |
| jQuery(this).replaceWith(new_heading); | |
| }) | |
| jQuery('body.home #content h1.entry-title').each(function(i) { | |
| var new_heading = jQuery('<h2></h2>').append(jQuery(this).contents()); | |
| new_heading.attr('id', jQuery(this).attr('id')); |
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 pg_test_dk( $reply_url, $redirect_to, $reply_id ) { | |
| error_log('redirecting: ' . print_r(compact($reply_url, $redirect_to, $reply_id), true)); | |
| } | |
| add_filter( 'bbp_new_reply_redirect_to', 'pg_test_dk', 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
| <?php | |
| function x_allow_ids_on_tags() { | |
| global $allowedposttags; | |
| $tags = array( 'section', 'article' ); | |
| $new_attributes = array( 'id' => array() ); | |
| foreach ( $tags as $tag ) { | |
| if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) | |
| $allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes ); |
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
| [dpa-achievements-index] | |
| [dpa-single-achievement 1] | |
| [dpa-breadcrumb] |
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
| // very rough, basic javascript calls to use the W3 Web Notifications api, rather than all the webkitNotifications stuff which you find in google. | |
| (function($) { | |
| $(document).ready(function() { | |
| // Ask for permission | |
| $('#ask_permission').click(function(e) { | |
| e.preventDefault(); | |
| // webkitNotifications.requestPermission(function(){}); // use this for safari / w3 standards | |
| // window.Notification.requestPermission(function(e) { alert(e); }); // use this for chrome (w3 standard causes a crash) |
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: Plugin Name | |
| Plugin URI: http://example.com/ | |
| Description: Description | |
| Version: 0.1 | |
| Author: Your Name | |
| Author URI: http://example.com/ | |
| */ |
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 | |
| $site_name = 'news_blog'; // e.g. "example.com/news_blog" | |
| $site_domain = 'example.com'; | |
| /** | |
| * Construct a fake $_SERVER global to get WordPress to load a specific site. | |
| * This avoids alot of messing about with switch_to_blog() and all its pitfalls. | |
| */ | |
| $_SERVER = array( | |
| 'HTTP_HOST' => $site_domain, |
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
| http://wordpress.org/grav-redirect.php?user=DJPaul&s=100 -> http://0.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?d=retro&s=100 |