]> _ Git - c6-wordpress.git/commitdiff
Update Blade SVG library. WIP #2684 @0.5
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 24 Apr 2019 14:42:27 +0000 (16:42 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 24 Apr 2019 14:42:27 +0000 (16:42 +0200)
wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php
wp-content/themes/c6/app/setup.php
wp-content/themes/c6/composer.json
wp-content/themes/c6/composer.lock

index 6e620718f3517582645e7b9e6b9ea348e8870033..27feca8eed91fee8c7f700be52ec7ab958e911bf 100644 (file)
@@ -292,7 +292,7 @@ class TextBlock extends Widget_Base {
         if (!empty($title)) echo "<h2 {$this->get_render_attribute_string('title')}>$title</h2>";
         if (!empty($body)) echo "<div {$this->get_render_attribute_string('body')}>$body</div>";
         if (!empty($cta_text)) {
-            echo "<a {$this->get_render_attribute_string('cta_text')}>". \BladeSvgSage\svg_image('arrow')->toHtml() ." $cta_text</a>";
+            echo "<a {$this->get_render_attribute_string('cta_text')}>". \App\svg_image('arrow')->toHtml() ." $cta_text</a>";
         }
         echo '</div>';
     }
@@ -337,7 +337,7 @@ class TextBlock extends Widget_Base {
             <# } #>
 
             <# if ('' !== settings.cta_text) { #>
-                <a {{{ view.getRenderAttributeString( 'cta_text' ) }}}><?= \BladeSvgSage\svg_image('arrow')->toHtml() ?> {{{ settings.cta_text }}}</a>
+                <a {{{ view.getRenderAttributeString( 'cta_text' ) }}}><?= \App\svg_image('arrow')->toHtml() ?> {{{ settings.cta_text }}}</a>
             <# } #>
 
         </div>
index 593120b945d3877c554325822d1c875b1c79aa3d..e28f182121393989ddfb01c197c78d8ffaebbc0c 100644 (file)
@@ -171,9 +171,14 @@ add_action('after_setup_theme', function () {
 
     /**
      * Setup Blade SVG library
+     * https://github.com/Log1x/blade-svg-sage
      */
-    add_filter('bladesvg_image_path', function () {
-        return \BladeSvgSage\get_dist_path('images');
+    add_filter('bladesvg', function () {
+        return [
+            'svg_path' => 'resources/assets/images',
+            'inline' => true,
+            'class' => 'svg'
+        ];
     });
 
 
index a844f6720e8dcdad750188caa3ff28c556b96d5d..0e31528a5ecb02dbf6ed5e157c885e3c2562cdbb 100644 (file)
@@ -37,7 +37,7 @@
     "illuminate/support": "5.6.*",
     "roots/sage-lib": "~9.0.9",
     "soberwp/controller": "~2.1.0",
-    "log1x/blade-svg-sage": "^1.0"
+    "log1x/blade-svg-sage": "^2.0"
   },
   "require-dev": {
     "squizlabs/php_codesniffer": "^2.8.0",
index 872394b776e4df1d10abbcfd6f266cc5b5cd125b..37a8631f4146eb6edb5f7b967df2b5e27111d4a1 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "0be3262402e190a85986bf389be471b9",
+    "content-hash": "00ece29b469a5d1a4056a22150688c05",
     "packages": [
         {
             "name": "brain/hierarchy",
         },
         {
             "name": "log1x/blade-svg-sage",
-            "version": "v1.0.6",
+            "version": "v2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Log1x/blade-svg-sage.git",
-                "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20"
+                "reference": "fb6f7e72d6a89a06960820f45397be319476ed42"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Log1x/blade-svg-sage/zipball/c41f1180d1eab3ea1040eb8bb2d02082bccc9c20",
-                "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20",
+                "url": "https://api.github.com/repos/Log1x/blade-svg-sage/zipball/fb6f7e72d6a89a06960820f45397be319476ed42",
+                "reference": "fb6f7e72d6a89a06960820f45397be319476ed42",
                 "shasum": ""
             },
             "require": {
-                "nothingworks/blade-svg": "^0.2.1",
-                "wikimedia/relpath": "^2.1"
+                "nothingworks/blade-svg": "^0.3.0",
+                "php": ">=7.0"
             },
             "type": "package",
             "autoload": {
                 "files": [
-                    "src/helpers.php",
-                    "src/blade-svg-sage.php"
+                    "src/BladeSvgSage.php",
+                    "src/helpers.php"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
                     "email": "brandon@tendency.me"
                 }
             ],
+            "description": "Composer package to add support for Blade SVG by Adam Wathan to Roots Sage.",
             "homepage": "https://github.com/log1x/blade-svg-sage",
-            "time": "2018-02-06T19:18:31+00:00"
+            "keywords": [
+                "blade",
+                "roots",
+                "sage",
+                "svg",
+                "wordpress"
+            ],
+            "time": "2019-02-07T22:45:02+00:00"
         },
         {
             "name": "nesbot/carbon",
         },
         {
             "name": "nothingworks/blade-svg",
-            "version": "v0.2.2",
+            "version": "v0.3.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/adamwathan/blade-svg.git",
-                "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24"
+                "reference": "c4b450d946172e30533c51ed99c74f3d3f4089a1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/adamwathan/blade-svg/zipball/fad56a6e5fb970e55b9745e547106ca09273fe24",
-                "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24",
+                "url": "https://api.github.com/repos/adamwathan/blade-svg/zipball/c4b450d946172e30533c51ed99c74f3d3f4089a1",
+                "reference": "c4b450d946172e30533c51ed99c74f3d3f4089a1",
                 "shasum": ""
             },
             "require": {
                     "email": "adam.wathan@gmail.com"
                 }
             ],
-            "time": "2017-08-13T20:55:40+00:00"
+            "time": "2018-10-21T21:02:25+00:00"
         },
         {
             "name": "psr/container",
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
             "time": "2019-04-10T16:20:36+00:00"
-        },
-        {
-            "name": "wikimedia/relpath",
-            "version": "2.1.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/wikimedia/RelPath.git",
-                "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/wikimedia/RelPath/zipball/35e701ff16abf461bb8676a9d9177f86fa0b2c94",
-                "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.5.9"
-            },
-            "require-dev": {
-                "jakub-onderka/php-parallel-lint": "^0.9.0.0",
-                "mediawiki/mediawiki-codesniffer": "15.0.0",
-                "phpunit/phpunit": "^4.8.9.0"
-            },
-            "type": "library",
-            "autoload": {
-                "files": [
-                    "src/RelPath/RelPath.php",
-                    "src/Wikimedia/RelPath.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Ori Livneh",
-                    "email": "ori@wikimedia.org"
-                }
-            ],
-            "description": "Compute a relative filepath between two paths.",
-            "homepage": "https://www.mediawiki.org/wiki/RelPath",
-            "time": "2018-01-18T21:23:40+00:00"
         }
     ],
     "packages-dev": [