bgame-hunter / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

ajax-controllers/download_def.php - wp-load.php directory #562

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
BEFORE YOU FILE: Are you using the latest version of the CCTM?  Please
check http://wordpress.org/extend/plugins/custom-content-type-manager/

What functionality do you want to see?

======================
Would it be possible to change the existing load of wp-load.php from:

require_once('../../../../wp-load.php');

to:

require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');

Or, maybe change the functionality ala 
http://ottopress.com/2010/dont-include-wp-load-please/

We don't have wp-load.php in the specific directory you have and would like to 
try the plugin out.

Thanks!
Tony
======================

Do you have examples of similar functionality on other sites or in other
plugins? (Please share URLs below)

Please provide any additional information below.

Original issue reported on code.google.com by anthony....@gmail.com on 1 Jul 2014 at 8:46

GoogleCodeExporter commented 8 years ago
The problem really is that WP doesn't provide a config var for the install path 
(*facepalm*).  Unfortunately you can't base the include off of 
$_SERVER['DOCUMENT_ROOT'] because WP might be installed in a sub-directory.

The workaround in that link doesn't actually handle this particular use case of 
needing ajax controllers (and it ignore's WP's unforgivable stupidity here).  

If you want to try out the plugin, just edit the path.

Original comment by ever...@fireproofsocks.com on 1 Jul 2014 at 10:03

GoogleCodeExporter commented 8 years ago
In Github refactor, I'm going to try and kill any and all paths and urls.

Original comment by ever...@fireproofsocks.com on 11 May 2015 at 5:30