From 435d294ff9dd2df6a727d296ae0cca261530474a Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Wed, 24 Apr 2019 16:42:27 +0200 Subject: [PATCH] Update Blade SVG library. WIP #2684 @0.5 --- .../cube/src/Elementor/Widgets/TextBlock.php | 4 +- wp-content/themes/c6/app/setup.php | 9 ++- wp-content/themes/c6/composer.json | 2 +- wp-content/themes/c6/composer.lock | 81 ++++++------------- 4 files changed, 33 insertions(+), 63 deletions(-) diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php index 6e62071..27feca8 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/TextBlock.php @@ -292,7 +292,7 @@ class TextBlock extends Widget_Base { if (!empty($title)) echo "

get_render_attribute_string('title')}>$title

"; if (!empty($body)) echo "
get_render_attribute_string('body')}>$body
"; if (!empty($cta_text)) { - echo "get_render_attribute_string('cta_text')}>". \BladeSvgSage\svg_image('arrow')->toHtml() ." $cta_text"; + echo "get_render_attribute_string('cta_text')}>". \App\svg_image('arrow')->toHtml() ." $cta_text"; } echo ''; } @@ -337,7 +337,7 @@ class TextBlock extends Widget_Base { <# } #> <# if ('' !== settings.cta_text) { #> - toHtml() ?> {{{ settings.cta_text }}} + toHtml() ?> {{{ settings.cta_text }}} <# } #> diff --git a/wp-content/themes/c6/app/setup.php b/wp-content/themes/c6/app/setup.php index 593120b..e28f182 100644 --- a/wp-content/themes/c6/app/setup.php +++ b/wp-content/themes/c6/app/setup.php @@ -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' + ]; }); diff --git a/wp-content/themes/c6/composer.json b/wp-content/themes/c6/composer.json index a844f67..0e31528 100644 --- a/wp-content/themes/c6/composer.json +++ b/wp-content/themes/c6/composer.json @@ -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", diff --git a/wp-content/themes/c6/composer.lock b/wp-content/themes/c6/composer.lock index 872394b..37a8631 100644 --- a/wp-content/themes/c6/composer.lock +++ b/wp-content/themes/c6/composer.lock @@ -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", @@ -586,27 +586,27 @@ }, { "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/", @@ -619,8 +619,16 @@ "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", @@ -677,16 +685,16 @@ }, { "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": { @@ -723,7 +731,7 @@ "email": "adam.wathan@gmail.com" } ], - "time": "2017-08-13T20:55:40+00:00" + "time": "2018-10-21T21:02:25+00:00" }, { "name": "psr/container", @@ -1276,49 +1284,6 @@ "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": [ -- 2.39.5