This file contains 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
Index: custom_metadata.php | |
=================================================================== | |
--- custom_metadata.php (revision 499358) | |
+++ custom_metadata.php (working copy) | |
@@ -871,12 +871,22 @@ | |
else $field_id = $field_slug; | |
$readonly_str = ($field->readonly) ? 'readonly="readonly" ' : ''; | |
+ | |
This file contains 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: Google Analyticator | |
* Version: 6.4.2.1.jer | |
* Plugin URI: http://wordpress.org/extend/plugins/google-analyticator/ | |
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set. PATCHED_BY_JEREMY_CLARKE: Fixed issue with array-based options (roles to hide, roles to see dashboard widget) being stomped by overzealous kses filtering. | |
* Author: Video User Manuals | |
* Author URI: http://www.videousermanuals.com | |
* Text Domain: google-analyticator | |
*/ |
This file contains 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 | |
/* | |
* Copyright 2008 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains 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
/** | |
* Beutified variable/array/object output for debugging | |
* | |
* Intellegently determines the type of data in $input and | |
* prints out a pleaseant rendering of its contents. | |
* | |
* Distinguishes between arrays, objects, strings, integers and booleans | |
* Otherwise states its not sure what $input is. | |
* | |
* $args is an array of optional parameters: |
This file contains 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 | |
/** | |
* Filter Caption shortcode attributes to enable the [shortcode] shortcode inside caption text | |
* | |
* WP doesn't run do_shortcode on the 'caption' text value parsed out of [caption], which means | |
* the [shortcode] shortcode doesn't work. | |
* | |
* We want [shortcode] to work but not necessarily any other shortcodes, so we will run do_shortcode() | |
* only if [shortcode] is present. Running do_shortcode() this way will process all shortcodes | |
* so beware any captions that for some reason also have a bad shortcode that will break formatting. |
This file contains 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 | |
/** | |
* Filter geo mashup 'where' clause to insert 'inherit' as a valid status when attachments are being queried | |
* | |
* By default geo mashup locations queries (i.e. posts queried inside the map) include the 'attachment' post type | |
* along with posts when post_type=all BUT it only checks for post_status=publish, so attachments are never part | |
* of the returned results. | |
* | |
* This function filters the 'where' clause of the locations query to add 'inherit' as a valid post status when | |
* attachments are a valid post type. It won't do anything if attachments aren't already part of the query and |
This file contains 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 | |
/** | |
* Insert site_name meta tag | |
*/ | |
$site_name = gv_get_site_name(); | |
$site_name_escaped = esc_attr($site_name); | |
$output .= "<meta property=\"og:site_name\" content=\"$site_name_escaped\" />\n"; | |
// WTF: Also add meta name=cre as site name because NYT uses it and facebook seems to pick it up from them despite it not being in the docs | |
$output .= "<meta name='cre' content='$site_name_escaped' />\n"; |
This file contains 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 | |
/* | |
* Test display of errors in HHVM/PHP | |
* | |
* In HHVM and often in normal PHP I want to see notices and errors inline to the | |
* document. This script tests the ability to make errors visible and has a solution | |
* that so far works in all the modern PHP and HHVM versions I tried. | |
*/ | |
echo "<h1>Error test document for PHP</h1>"; |
This file contains 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 | |
/* | |
* Simple function to intentionally crash HHVM and trigger our PHP-FPM fallback | |
* | |
* For whatever reason having two "default:"" clauses in a switch statement crashes HHVM but not PHP-FPM | |
* In HHVM error logs it causes: Fatal error: Switch statements may only contain one default: clause in /var/www/sites/monittest/index.php on line XX | |
* | |
* This can be used to intentionally trigger a fallback from HHVM to PHP-FPM in our system, which normally happens | |
* to avoid scripts with rare HHVM bugs from crashing completely to WSOD, and to keep the server mostly working | |
* if HHVM failed completely, which has happened a couple of times. |
This file contains 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 | |
/** | |
* EDIT FLOW: wp_insert_post action to autosave "draft" editorial comments in post meta field | |
* | |
* Currently (2016-10-06) Edit Flow has no handling of unsubmitted editorial comments in the textarea | |
* when the post is saved, so saving your post deletes your comment unless you submitted it, which is awful. | |
* | |
* This function hooks into wp_insert_post where the value of the textarea is present (but ignored by default) | |
* and if found, saves the text (and ID of parent comment if it was a specific reply) to a postmeta field | |
* keyed on the user who saves the post. |
OlderNewer