Browse Source

set plugin basenames

master
thomas.fellinger 5 years ago
parent
commit
1a8773908a
3 changed files with 13 additions and 13 deletions
  1. +3
    -3
      sandbox-adaptions/sandbox-adaptions.php
  2. +2
    -2
      sandbox-stats.php
  3. +8
    -8
      sandbox-stats/sandbox-stats.php

+ 3
- 3
sandbox-adaptions/sandbox-adaptions.php View File

@@ -23,8 +23,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

define('SOCOS_IO_ADAPTIONS_PATH', plugin_dir_path(__FILE__));
define('SOCOS_IO_ADAPTIONS_URL', plugin_dir_url(__FILE__));
define('SANDBOX_ADAPTIONS_PATH', plugin_dir_path(__FILE__));
define('SANDBOX_ADAPTIONS_URL', plugin_dir_url(__FILE__));

/**
* Ajax hooks
@@ -271,7 +271,7 @@ function sandbox_admin_body_class($classes){

// add custom styles for admin section
function sandbox_admin_styles_load(){
wp_register_style('sandbox_admin', SOCOS_IO_ADAPTIONS_URL . '/admin/style.css');
wp_register_style('sandbox_admin', SANDBOX_ADAPTIONS_URL . '/admin/style.css');
wp_enqueue_style('sandbox_admin');
}



+ 2
- 2
sandbox-stats.php View File

@@ -1,6 +1,6 @@
<?php
/**
* Plugin name: socos.io stats
* Plugin name: sandbox stats
* Plugin URI: https://www.netzgestaltung.at
* Author: Thomas Fellinger
* Author URI: https://www.netzgestaltung.at
@@ -27,6 +27,6 @@
* @see https://wordpress.org/support/article/must-use-plugins/
* @see https://premium.wpmudev.org/blog/why-you-shouldnt-use-functions-php/
*/
require WPMU_PLUGIN_DIR . '/socos-io-stats/socos-io-stats.php';
// require WPMU_PLUGIN_DIR . '/sandbox-stats/sandbox-stats.php';
?>


+ 8
- 8
sandbox-stats/sandbox-stats.php View File

@@ -1,6 +1,6 @@
<?php
/**
* Plugin name: socos.io adaptions
* Plugin name: sandbox adaptions
* Plugin URI: https://www.netzgestaltung.at
* Author: Thomas Fellinger
* Author URI: https://www.netzgestaltung.at
@@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
define('SOCOS_IO_STATS_PATH', plugin_dir_path(__FILE__));
define('SOCOS_IO_STATS_URL', plugin_dir_url(__FILE__));
define('SANDBOX_STATS_PATH', plugin_dir_path(__FILE__));
define('SANDBOX_STATS_URL', plugin_dir_url(__FILE__));

/**
* Plugin setup hook
@@ -64,15 +64,15 @@ function sandbox_setup_stats() {
* License: GNU General Public License v2.0
*/
function sandbox_get_matomo_tracker(){
include_once(SOCOS_IO_STATS_PATH . '/config.php');
include_once(SOCOS_IO_STATS_PATH . '/MatomoTracker.php');
include_once(SANDBOX_STATS_PATH . '/config.php');
include_once(SANDBOX_STATS_PATH . '/MatomoTracker.php');

MatomoTracker::$URL = SOCOS_IO_STATS_TRACKER_URL;
$matomoTracker = new MatomoTracker(SOCOS_IO_STATS_SITE_ID);
MatomoTracker::$URL = SANDBOX_STATS_TRACKER_URL;
$matomoTracker = new MatomoTracker(SANDBOX_STATS_SITE_ID);

// Specify an API token with at least Write permission, so the Visitor IP address can be recorded
// Learn more about token_auth: https://matomo.org/faq/general/faq_114/
$matomoTracker->setTokenAuth(SOCOS_IO_STATS_AUTH_TOKEN);
$matomoTracker->setTokenAuth(SANDBOX_STATS_AUTH_TOKEN);

// You can manually set the visitor details (resolution, time, plugins, etc.)
// See all other ->set* functions available in the MatomoTracker.php file


Loading…
Cancel
Save