Changeset 719446
- Timestamp:
- 05/28/2013 04:28:56 PM (13 years ago)
- Location:
- conductrics-webactions/trunk
- Files:
-
- 2 edited
-
conductrics-webactions.php (modified) (1 diff)
-
includes/wa-runtime.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
conductrics-webactions/trunk/conductrics-webactions.php
r718074 r719446 3 3 Plugin Name: Conductrics Web Actions 4 4 Description: Includes Conductrics Web Actions scripts in your pages, which makes it easy to test changes to your pages, track their success, and do dynamic targeting. 5 Version: 0.2. 75 Version: 0.2.8 6 6 Author: Conductrics 7 7 Author URI: http://conductrics.com -
conductrics-webactions/trunk/includes/wa-runtime.php
r712473 r719446 11 11 } 12 12 $agents = $this->get_relevant_agent_codes( $account_options ); 13 foreach ( $agents as $agentCode ) { 14 $this->include_script_for_agent( $agentCode, $account_options ); 15 } 13 $agentCodes = implode(",", $agents); 14 $this->include_script_for_agents( $agentCodes, $account_options ); 16 15 } 17 16 18 function include_script_for_agent ( $agentCode, $account_options ) {17 function include_script_for_agents( $agentCodes, $account_options ) { 19 18 # Bail early if required info missing 20 if ( empty($agentCode ) || empty($account_options) ) {19 if ( empty($agentCodes) || empty($account_options) ) { 21 20 return; 22 21 } … … 25 24 $baseurl = "http://api.conductrics.com"; 26 25 } 27 $owner = $account_options['owner']; 28 $apikey = $account_options['apikey']; 29 $wa_styles_alias = "conductrics-wa-${agentCode}"; 30 $wa_styles_url = "$baseurl/$owner/$agentCode/web-actions-css?apikey=$apikey"; 31 $wa_script_alias = "conductrics-wa-${agentCode}"; 32 $wa_script_url = "$baseurl/$owner/$agentCode/web-actions?apikey=$apikey"; 33 // Include the styles for this web action 34 wp_enqueue_style( 35 $wa_styles_alias, 36 $wa_styles_url 37 ); 26 $owner = urlencode($account_options['owner']); 27 $apikey = urlencode($account_options['apikey']); 28 $agentCodes = urlencode($agentCodes); 29 $wa_script_alias = "conductrics-wa-script"; 30 $wa_script_url = "$baseurl/$owner/-/web-actions?apikey=$apikey&decisions-for-agents=$agentCodes"; 38 31 // Include the script for this web action 39 32 wp_enqueue_script( … … 41 34 $wa_script_url, 42 35 array('jquery'), # WP will make sure jQuery is included for us 43 false, # version 44 true # wewant to be placed in the footer36 false, # version could be specified here 37 false # we don't want to be placed in the footer 45 38 ); 46 39 }
Note: See TracChangeset
for help on using the changeset viewer.