File: 010disabling_update_note.patch

package info (click to toggle)
wordpress 4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 72,208 kB
  • sloc: php: 130,697; cs: 6,126; sh: 494; xml: 59; makefile: 27
file content (13 lines) | stat: -rw-r--r-- 592 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
Author: Giuseppe Iuculano <giuseppe@iuculano.it>
Description: Disabled the the "please update" warning, thanks to Hans Spaans and Rolf Leggewie (Closes: #506685)
--- a/wp-admin/includes/update.php
+++ b/wp-admin/includes/update.php
@@ -28,6 +28,8 @@
  * @return bool|array Array of the update objects on success, false on failure.
  */
 function get_core_updates( $options = array() ) {
+	if ( !constant('WP_CORE_UPDATE') )
+		return false;
 	$options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );
 	$dismissed = get_site_option( 'dismissed_update_core' );