Skip to content

Commit

Permalink
chore: change CDN acceleration service to bootcdn
Browse files Browse the repository at this point in the history
  • Loading branch information
seatonjiang committed Jun 24, 2023
1 parent 105aa00 commit 59aa92b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions inc/codestar-framework/classes/setup.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@ public static function add_admin_enqueue_scripts()

// Font awesome 4 and 5 loader
if (apply_filters('csf_fa4', false)) {
wp_enqueue_style('csf-fa', 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome' . $min . '.css', array(), '4.7.0', 'all');
wp_enqueue_style('csf-fa', 'https://cdn.bootcdn.net/ajax/libs/font-awesome/4.7.0/css/font-awesome' . $min . '.css', array(), '4.7.0', 'all');
} else {
wp_enqueue_style('csf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all' . $min . '.css', array(), '5.15.5', 'all');
wp_enqueue_style('csf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/v4-shims' . $min . '.css', array(), '5.15.5', 'all');
wp_enqueue_style('csf-fa5', 'https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.4/css/all' . $min . '.css', array(), '5.15.5', 'all');
wp_enqueue_style('csf-fa5-v4-shims', 'https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.4/css/v4-shims' . $min . '.css', array(), '5.15.5', 'all');
}

// Main style
Expand Down
6 changes: 3 additions & 3 deletions inc/codestar-framework/fields/code_editor/code_editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CSF_Field_code_editor extends CSF_Fields
{

public $version = '5.62.2';
public $cdn_url = 'https://cdn.jsdelivr.net/npm/codemirror@';
public $cdn_url = 'https://cdn.bootcdn.net/ajax/libs/codemirror/';

public function __construct($field, $value = '', $unique = '', $where = '', $parent = '')
{
Expand Down Expand Up @@ -51,12 +51,12 @@ public function enqueue()
}

if (!wp_script_is('csf-codemirror')) {
wp_enqueue_script('csf-codemirror', esc_url($this->cdn_url . $this->version . '/lib/codemirror.min.js'), array('csf'), $this->version, true);
wp_enqueue_script('csf-codemirror', esc_url($this->cdn_url . $this->version . '/codemirror.min.js'), array('csf'), $this->version, true);
wp_enqueue_script('csf-codemirror-loadmode', esc_url($this->cdn_url . $this->version . '/addon/mode/loadmode.min.js'), array('csf-codemirror'), $this->version, true);
}

if (!wp_style_is('csf-codemirror')) {
wp_enqueue_style('csf-codemirror', esc_url($this->cdn_url . $this->version . '/lib/codemirror.min.css'), array(), $this->version);
wp_enqueue_style('csf-codemirror', esc_url($this->cdn_url . $this->version . '/codemirror.min.css'), array(), $this->version);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion inc/codestar-framework/fields/map/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CSF_Field_map extends CSF_Fields
{

public $version = '1.7.1';
public $cdn_url = 'https://cdn.jsdelivr.net/npm/leaflet@';
public $cdn_url = 'https://cdn.bootcdn.net/ajax/libs/leaflet/';

public function __construct($field, $value = '', $unique = '', $where = '', $parent = '')
{
Expand Down
2 changes: 1 addition & 1 deletion inc/codestar-framework/fields/typography/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function enqueue()

CSF::include_plugin_file('fields/typography/google-fonts.php');

wp_enqueue_script('csf-webfontloader', 'https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.min.js', array('csf'), '1.6.28', true);
wp_enqueue_script('csf-webfontloader', 'https://cdn.bootcdn.net/ajax/libs/webfont/1.6.28/webfontloader.js', array('csf'), '1.6.28', true);

$webfonts = array();

Expand Down
4 changes: 2 additions & 2 deletions inc/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 主题选项
* @author Seaton Jiang <[email protected]>
* @license GPL-3.0 License
* @version 2023.06.06
* @version 2023.06.24
*/

defined('ABSPATH') || exit;
Expand Down Expand Up @@ -599,7 +599,7 @@ function getrobots()
'type' => 'code_editor',
'settings' => array(
'theme' => 'default',
'mode' => 'html',
'mode' => 'htmlmixed',
),
'sanitize' => false,
'default' => '<script></script>',
Expand Down

0 comments on commit 59aa92b

Please sign in to comment.