Plugin Directory

Changeset 1929772


Ignore:
Timestamp:
08/24/2018 03:15:07 PM (8 years ago)
Author:
johnalarcon
Message:

Fix Server Error 406 that occurred due to including a local file via HTTP URL instead of relative URL.

Location:
site-info/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • site-info/trunk/alar-site-info.php

    r1924955 r1929772  
    44 * Plugin Name: Site Info
    55 * Description: Discover your current versions for WordPress, PHP, plugins, themes, and various other server information.
    6  * Version: 1.0.0
     6 * Version: 1.1.0
    77 * Author: John Alarcon
    88 * Author URI: https://twitter.com/realJohnAlarcon
  • site-info/trunk/includes/constants.php

    r1924955 r1929772  
    3636const MENU_POS     = 66;
    3737
    38 /**
    39  * Now for paths and URLs. To get the relative path of the site root, we need to
    40  * ensure that the get_home_path() function is available. That function provides
    41  * the root path, even if the installation is in a sub-directory. To do this, we
    42  * need to include the file ../wp-admin/includes/file.php where this function is
    43  * defined. See: https://wordpress.stackexchange.com/a/188461
    44  */
    45 if(!function_exists('get_home_path')) {
    46     $inc_file_path = str_replace(
    47         untrailingslashit(home_url()),
    48         untrailingslashit(ABSPATH),
    49         untrailingslashit(get_admin_url())
    50     );
    51     require_once $inc_file_path.'/includes/file.php';
    52 }
     38// Get the core file.php file.
     39require_once(ABSPATH.'wp-admin/includes/file.php');
    5340
    5441/**
  • site-info/trunk/readme.txt

    r1924934 r1929772  
    5050**I found a bug!**
    5151Let me know on the support forum and I'll get it fixed. Please note that if you're requesting a "missing" feature, it won't necessarily be considered a bug.
     52
     53== Changelog ==
     54**1.1.0**
     55Fix Server Error 406 that occurred on some hosts due to including a local file via HTTP URL instead of relative path.
Note: See TracChangeset for help on using the changeset viewer.