Plugin Directory

Changeset 1509094


Ignore:
Timestamp:
10/06/2016 05:22:09 AM (10 years ago)
Author:
worldclassio
Message:

custom domains

Location:
worldclass-lms/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • worldclass-lms/trunk/admin/admin.php

    r1508589 r1509094  
    110110    if ($wcio_options['wc_domain']) {
    111111        $domain = $wcio_options['wc_domain'];
    112         // We have a domain, let's fetch the data from it
     112        // We have a domain, let's check if it's a custom domain
     113        // or a worldclass.io domain
     114        $data_url = null;
     115        if (strpos($domain, '.worldclass.io') > -1) {
     116            // This is a standard worldclass.io domain
     117            $data_url = "https://$domain/index.php/api/appGet";
     118        }
     119        else {
     120            // This is a custom domain
     121            $dashed = str_replace('.', '-', $domain);
     122            $data_url = 'https://custom-domain-' . $dashed . '.worldclass.io/index.php/api/appGet';
     123        }
     124
    113125        // Fetch data from academy
    114         $data_url = "https://$domain/index.php/api/appGet";
    115126        $data = url_get($data_url);
    116127
  • worldclass-lms/trunk/readme.txt

    r1508589 r1509094  
    44Requires at least: 4.3
    55Tested up to: 4.5.2
    6 Stable tag: 1.9
     6Stable tag: 1.10
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7979== Changelog ==
    8080
    81 = 1.9 =
     81= 1.10 =
    8282* Added custom domains support
    8383
  • worldclass-lms/trunk/worldclass.php

    r1508589 r1509094  
    88Text Domain: wcio
    99Domain Path: /languages/
    10 Version: 1.9
     10Version: 1.10
    1111*/
    1212
    13 define( 'WCIO_VERSION', '1.9' );
     13define( 'WCIO_VERSION', '1.10' );
    1414
    1515define( 'WCIO_REQUIRED_WP_VERSION', '4.3' );
Note: See TracChangeset for help on using the changeset viewer.