Changeset 1729372
- Timestamp:
- 09/13/2017 02:20:25 PM (9 years ago)
- Location:
- adtechmedia/trunk
- Files:
-
- 7 edited
-
adtechmedia-config.php (modified) (1 diff)
-
adtechmedia-plugin.php (modified) (1 diff)
-
adtechmedia-request.php (modified) (1 diff)
-
adtechmedia.php (modified) (1 diff)
-
js/main.js (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
views/admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
adtechmedia/trunk/adtechmedia-config.php
r1720581 r1729372 76 76 self::$conf['register_url_tpl'] = 'https://manage-test.adtechmedia.io/accounts/signup/%s'; 77 77 self::$conf['terms_url'] = 'https://manage-test.adtechmedia.io/deep-account/terms/dialog.html'; 78 } else if ( self::is_stage() ) { 79 self::$conf['api_end_point'] = 'https://api-stage.adtechmedia.io/v1/'; 80 self::$conf['ads_video'] = 'https://manage-stage.adtechmedia.io/atm-admin/atm-build/demo-vast.xml'; 81 self::$conf['sw_js_url'] = 'https://manage-stage.adtechmedia.io/atm-admin/atm-build/sw.min.js'; 82 self::$conf['tpl_js_url'] = 'https://manage-stage.adtechmedia.io/atm-admin/atm-build/atmTpl.js'; 83 self::$conf['br_js_url'] = 'https://manage-stage.adtechmedia.io/atm-admin/atm-build/atmBr.js'; 84 self::$conf['tpl_mgmt_js_url'] = 'https://manage-stage.adtechmedia.io/atm-admin/atm-build/atmTplManager.js'; 85 self::$conf['register_url_tpl'] = 'https://manage-stage.adtechmedia.io/accounts/signup/%s'; 86 self::$conf['terms_url'] = 'https://manage-stage.adtechmedia.io/deep-account/terms/dialog.html'; 78 87 } 88 } 89 90 /** 91 * Is stage 92 * 93 * @return bool 94 */ 95 public static function is_stage() { 96 $server_name = isset( $_SERVER['SERVER_NAME'] ) 97 ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) 98 : null; 99 return preg_match( '/dev-[^\.]+\.pantheonsite\.io/i', $server_name ); 79 100 } 80 101 -
adtechmedia/trunk/adtechmedia-plugin.php
r1722776 r1729372 92 92 ]; 93 93 if ( $api_result ) { 94 $this->update_from_api_option( 'selector', $api_result['Config']['defaults']['content']['selector'] );95 94 $this->update_from_api_option( 'price', $api_result['Config']['defaults']['payment']['price'] ); 96 95 $this->update_from_api_option( 'support_email', $api_result['SupportEmail'] ); -
adtechmedia/trunk/adtechmedia-request.php
r1703090 r1729372 17 17 * @param string $property_id id of property. 18 18 * @param string $type type of decision. 19 * @param array $data decision content.19 * @param array $data decision content. 20 20 * @param string $key API key. 21 21 * @return mixed -
adtechmedia/trunk/adtechmedia.php
r1726151 r1729372 3 3 * Plugin Name: AdTechMedia 4 4 * Plugin URI: https://wordpress.org/plugins/adtechmedia/ 5 * Version: 0.12. 65 * Version: 0.12.7 6 6 * Author: AdTechMedia.io 7 7 * Description: AdTechMedia is an advertising platform with micropayments capabilities for media content monetization. We help publishers and content providers to generate complimentary revenue streams that are immune to ad blocking software (e.g. native advertising or native micropayments). Our solutions are white labeled, data driven and realtime. To learn more, contact hello@adtechmedia.io or visit www.adtechmedia.io. -
adtechmedia/trunk/js/main.js
r1726151 r1729372 402 402 if (!apiKey) { return false } 403 403 404 const brEngine = atmBr(isLocalhost ? 'test' : 'prod'); 404 var atmEnv = 'prod'; 405 406 if (isLocalhost) { 407 atmEnv = 'test'; 408 } else if (isStage) { 409 atmEnv = 'stage'; 410 } 411 412 const brEngine = atmBr(atmEnv); 405 413 const brRendition = brEngine.authorize(apiKey).render('#br-manager').defaultSchema(); 406 414 … … 421 429 422 430 const saveTemplatesBtn = jQuery('#save-templates-config'); 423 const tplManager = atmTplManager( isLocalhost ? 'test' : 'prod');431 const tplManager = atmTplManager(atmEnv); 424 432 const runtime = tplManager.rendition().render('#template-editor'); 425 433 426 function applyOverallStyles(appearanceSettings ) {434 function applyOverallStyles(appearanceSettings, showNotify = false) { 427 435 if (!appearanceSettings) { return; } 428 436 var overallHtml = ''; … … 450 458 appearanceSettings: JSON.stringify(tplManager.generalSettings) 451 459 }, 460 success: function () { 461 if (showNotify) { removeLoader(saveTemplatesBtn); } 462 }, 452 463 error: function(response) { 453 464 showError(); … … 482 493 }) 483 494 .then(function() { 484 removeLoader(saveTemplatesBtn); 485 applyOverallStyles(tplManager.generalSettings); 495 applyOverallStyles(tplManager.generalSettings, true); 486 496 }) 487 497 .catch(function(error) { -
adtechmedia/trunk/readme.txt
r1726151 r1729372 10 10 Requires at least: 3.6 11 11 Tested up to: 4.8 12 Stable tag: 0.12. 612 Stable tag: 0.12.7 13 13 14 14 -
adtechmedia/trunk/views/admin.php
r1722776 r1729372 43 43 echo 'var themeVersion = "' . addslashes( wp_get_theme()->get( 'Version' ) ) . '";' . PHP_EOL; 44 44 echo 'var isLocalhost = "' . addslashes( Adtechmedia_Config::is_localhost() ) . '";' . PHP_EOL; 45 echo 'var isStage = "' . addslashes( Adtechmedia_Config::is_stage() ) . '";' . PHP_EOL; 45 46 echo 'var platformId = "' . addslashes( Adtechmedia_Config::get ( 'platform_id' ) ) . '";' . PHP_EOL; 46 47 echo 'var platformVersion = "' . addslashes( preg_replace( '/^(\d+)([^\d].*)?$/', '$1', get_bloginfo( 'version' ) ) ) . '";' . PHP_EOL;
Note: See TracChangeset
for help on using the changeset viewer.