Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Carson McDonald

    (@carson-mcdonald)

    I have made another update that I think should address this by using the built in way of finding the admin URL. If you would try the 2.0.2 version and let me know if it works.

    Thread Starter geminorum

    (@geminorum)

    the gad_main.js.php includes correctly on 2.0.2, but I get fatal in the gad_main.js.php for including wp-config.php

    Plugin Contributor Carson McDonald

    (@carson-mcdonald)

    Can you give me an idea of where wp-config.php is in relationship to the plugin directory? I’ll need to see how best to do that. Curse the WP examples for not doing it in a way that works for everyone, I didn’t know people moved the content dir.

    Thread Starter geminorum

    (@geminorum)

    if ( file_exists( ABSPATH . 'wp-config.php') ) {
    	/** The config file resides in ABSPATH */
    	require_once( ABSPATH . 'wp-config.php' );
    } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
    	/** The config file resides one level above ABSPATH but is not part of another install*/
    	require_once( dirname(ABSPATH) . '/wp-config.php' );
    }

    form wp-load.php

    p.s. I don’t think that’s working for the AJAX! I’ll see other plugins.

    Thread Starter geminorum

    (@geminorum)

    I think the better approach is to get gad_get_admin_url(‘/admin-ajax.php’); via a JS var into the code by printing on the <head>, link gad_main.js.php content as regular script and then call the function with the var.

    Thread Starter geminorum

    (@geminorum)

    And besides, by using .js.php method, the plugin waste resources by making unnecessary calls.

    Plugin Contributor Carson McDonald

    (@carson-mcdonald)

    After your suggestion I dug a little more and there is an ajaxurl javascript variable that seems to be the key. I have updated the plugin again to incorporate that and get rid of the need for the php generation. I hope that will fix a number of odd issues people have been seeing. Can you see if this also resolves the issue of having wp-content in a different location? I have about 9 different WP installs now and this is a setup I still didn’t have time to try.

    Thread Starter geminorum

    (@geminorum)

    2.0.3 works like a charm.
    thank you for the support.

    Plugin Contributor Carson McDonald

    (@carson-mcdonald)

    No problem.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Google Analytics Dashboard] Custom wp-content support’ is closed to new replies.