Skip to content

Instantly share code, notes, and snippets.

@loxK
Created February 24, 2011 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loxK/841744 to your computer and use it in GitHub Desktop.
Save loxK/841744 to your computer and use it in GitHub Desktop.
Auto-thixkbox patch for error notices and useless ?> at the end of php files
Index: auto-thickbox-info.php
===================================================================
--- auto-thickbox-info.php (révision 350190)
+++ auto-thickbox-info.php (copie de travail)
@@ -6,4 +6,3 @@
__('Image', 'auto-thickbox');
__('of', 'auto-thickbox');
__('Close', 'auto-thickbox');
-?>
\ No newline at end of file
Index: auto-thickbox.php
===================================================================
--- auto-thickbox.php (révision 350190)
+++ auto-thickbox.php (copie de travail)
@@ -152,7 +152,7 @@
} # thickbox_images()
} # auto_thickbox
-if ( !is_admin() && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false ) {
+if ( !is_admin() && isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false ) {
if ( !class_exists('anchor_utils') )
include dirname(__FILE__) . '/anchor-utils/anchor-utils.php';
@@ -163,4 +163,3 @@
add_filter('filter_anchor', array('auto_thickbox', 'filter'));
}
-?>
\ No newline at end of file
Index: anchor-utils/anchor-utils.php
===================================================================
--- anchor-utils/anchor-utils.php (révision 350190)
+++ anchor-utils/anchor-utils.php (copie de travail)
@@ -294,4 +294,3 @@
add_filter('comment_text', array('anchor_utils', 'filter'), 100);
add_action('wp_head', array('anchor_utils', 'ob_start'), 10000);
-?>
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment