I hereby claim:
- I am peterbooker on github.
- I am peterbooker (https://keybase.io/peterbooker) on keybase.
- I have a public key whose fingerprint is E2D1 65D5 5B52 2988 07AA 1EC8 B872 5CB5 530C 45B7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /* | |
| * Plugin Auto Updates Whitelist | |
| * Allows Forced Updates for listed Plugin Slugs | |
| */ | |
| function prefix_forced_update_whitelist_plugins( $update, $item ) { | |
| // Examples, please add plugin slugs that you trust. | |
| $plugins = array ( | |
| 'jetpack', 'wordpress-seo', 'plugin-slug', |
| <?php | |
| /* | |
| * Provide fallback output incase no Menu is selected. | |
| */ | |
| public static function fallback( $args = array() ) { | |
| /* | |
| * No content for left side Fallback | |
| */ | |
| if ( 'left' == $args['menu_class'] ) { |
| <?php | |
| /** | |
| * Add Last-Modified and Cache-Control Headers to WP Responses | |
| */ | |
| function wp_cloudfront_filter_headers( $headers ) { | |
| /* | |
| * WP already sets Cache-Control headers to avoid caching in the admin. | |
| */ | |
| if ( is_admin() ) { |
| <?php | |
| /** | |
| * Validate URLs | |
| * | |
| * @param string $url | |
| * @param boolean $strict | |
| * @return string|boolean | |
| */ | |
| function kbso_validate_url( $url, $strict = false ) { |
| <?php | |
| /* | |
| * Google Font Importer | |
| */ | |
| $fonts = "https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyCpfnm5kVng8hhP_jnAnnTXVP7MEUM89-k"; | |
| $fonts = file_get_contents($fonts, 0, null, null); | |
| $fp = fopen('fonts.txt', 'w'); |
| <?php | |
| /* | |
| * Query the wordpress.org Plugins API | |
| */ | |
| $query = array( | |
| 'action' => 'query_plugins', | |
| 'request' => serialize( | |
| (object) array( | |
| 'page' => 1, |
| <?php | |
| /* | |
| * Converts Tweet text urls, account names and hashtags into HTML links. | |
| * Accepts return data from Twitter API (v1.1) | |
| */ | |
| function kebo_twitter_linkify( $tweets ) { | |
| foreach ( $tweets as $tweet ) { | |
| $hash_length = 45; // Length of HTML added to hashtags |
| <?php | |
| /* | |
| * Display BBC News Headlines | |
| */ | |
| function pb_display_news() { | |
| // Get the News data | |
| $headlines = pb_get_news(); |
| <?php | |
| /* | |
| * Refreshes the Transient data. | |
| */ | |
| function pb_refresh_news() { | |
| // Make HTTP request to BBC News API. | |
| $response = wp_remote_request( 'http://api.bbcnews.appengine.co.uk/stories/headlines' ); | |