HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/tco-google-analytics/functions/enqueue/scripts.php
<?php

// =============================================================================
// FUNCTIONS/ENQUEUE/SCRIPTS.PHP
// -----------------------------------------------------------------------------
// Enqueue all scripts for the Google Analytics.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Site Scripts
// =============================================================================

// Enqueue Site Scripts
// =============================================================================

function tco_google_analytics_enqueue_admin_scripts( $hook ) {

  $hook_prefixes = array(
    'addons_page_x-extensions-google-analytics',
    'theme_page_x-extensions-google-analytics',
    'x_page_x-extensions-google-analytics',
    'x_page_tco-extensions-google-analytics',
    'x-pro_page_x-extensions-google-analytics',
    'pro_page_tco-extensions-google-analytics',
    'tco-extensions-google-analytics',
    'settings_page_tco-extensions-google-analytics',
  );

  if ( in_array($hook, $hook_prefixes) ) {

    wp_enqueue_script( 'postbox' );
    wp_enqueue_script( 'tco-google-analytics-admin-js', TCO_GOOGLE_ANALYTICS_URL . '/js/admin/main.js', array( 'jquery' ), NULL, true );

  }

}

add_action( 'admin_enqueue_scripts', 'tco_google_analytics_enqueue_admin_scripts' );