Sync plugins from current page

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-09-11 19:08:46 +02:00
parent 85d41e4216
commit 8515ff9587
1847 changed files with 505469 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* WordPress Version Info
*
* @package wp-version-info
* @author Alexander Goller <alpipego@gmail.com>
* @copyright 2019 Alexander Goller
* @license MIT
*
* @wordpress-plugin
*
* Plugin Name: WordPress Version Info
* Plugin URI: https://wordpress.org/plugins/version-info
* Description: Show current WordPress, PHP, Web Server and MySQL versions in admin footer
* Author: alpipego
* Author URI: http://alpipego.com/
* Version: 1.1.5
* License: MIT
* GitHub Plugin URI: https://github.com/alpipego/wp-version-info
* Text Domain: version-info
*/
// pseudo namespace
class VersionInfo {
private $db;
public function __construct( \wpdb $wpdb ) {
$this->db = $wpdb;
add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) );
add_filter( 'update_footer', array( $this, 'version_in_footer' ), 11 );
}
public function load_text_domain() {
load_plugin_textdomain( 'version-info' );
}
public function version_in_footer() {
$update = core_update_footer();
$wp_version = strpos( $update, '<strong>' ) === 0 ? get_bloginfo( 'version' ) . ' (' . $update . ')' : get_bloginfo( 'version' );
return sprintf( esc_attr__( 'You are running WordPress %s | PHP %s | %s | MySQL %s', 'version-info' ), $wp_version, phpversion(), $_SERVER['SERVER_SOFTWARE'], $this->db->get_var('SELECT VERSION();') );
}
}
global $wpdb;
new VersionInfo( $wpdb );