Skip to content

Commit 64cb4d8

Browse files
committed
[Minor] Changed underscore ZIP example to mobile-detect.js
1 parent 83bf83a commit 64cb4d8

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

app/EnqueueScripts.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ function __construct() {
2525
*/
2626
public function enqueue_frontend_scripts() {
2727

28-
// Example enqueuing a script added from ZIP file via composer (http://underscorejs.org/)
29-
wp_enqueue_script( 'underscore', $this->get_script_url('vendor/jashkenas/underscore/underscore-min.js'), null, '1.8.3' );
28+
// Enqueuing a script added from ZIP file via composer (http://hgoebl.github.io/mobile-detect.js/),
29+
// purely as an example.
30+
wp_enqueue_script( 'modile-detect', $this->get_script_url('vendor/hgoebl/mobile-detect/mobile-detect.min.js'), null, '1.3.6' );
3031

3132
// Enqueuing custom CSS for child theme (Twentysixteen was used for testing)
3233
wp_enqueue_style( 'wordpress-base-plugin', $this->get_script_url('assets/css/site.css'), null, $this->get_script_version('assets/css/site.css') );

composer.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@
2323
"source": "https://github.com/dmhendricks/wordpress-base-plugin/"
2424
},
2525
"repositories": [
26-
{
27-
"type": "package",
28-
"package": {
29-
"name": "jashkenas/underscore",
30-
"version": "1.8.3",
31-
"dist": {
32-
"type": "zip",
33-
"url": "https://github.com/jashkenas/underscore/archive/1.8.3.zip",
34-
"reference": "master"
35-
},
36-
"autoload": {
37-
"classmap": ["."]
38-
}
26+
{
27+
"type": "package",
28+
"package": {
29+
"name": "hgoebl/mobile-detect",
30+
"version": "1.3.6",
31+
"dist": {
32+
"type": "zip",
33+
"url": "https://github.com/hgoebl/mobile-detect.js/archive/v1.3.6.zip",
34+
"reference": "master"
35+
},
36+
"autoload": {
37+
"classmap": ["."]
3938
}
4039
}
40+
}
4141
],
4242
"require": {
4343
"php": ">=5.4.0",
4444
"htmlburger/carbon-fields": "^2.0.0",
4545
"jjgrainger/posttypes": "dev-master",
46-
"jashkenas/underscore": ">=1.8.0",
46+
"hgoebl/mobile-detect": ">=1.3.0",
4747
"composer/installers": "~1.3.0"
4848
},
4949
"minimum-stability": "dev",

0 commit comments

Comments
 (0)