From bba1edcaf68c1922fd3ef0f7cf3b7e2505daa04d Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Mon, 11 Sep 2023 21:20:05 -0700 Subject: [PATCH] updated Switched cdn to jsdelivr and added noscript --- juxtapose.php | 111 +++++++++++++++++++++++++++----------------------- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/juxtapose.php b/juxtapose.php index 978c010..de504a6 100644 --- a/juxtapose.php +++ b/juxtapose.php @@ -1,72 +1,83 @@ 50, + "showlabels" => true, + "showcredits" => true, + "animate" => true, + "mode" => "horizontal", - $a = shortcode_atts( array( - 'startingposition' => 50, - 'showlabels' => true, - 'showcredits' => true, - 'animate' => true, - 'mode' => 'horizontal', + "leftsrc" => "", + "leftlabel" => "", + "leftcredit" => "", - 'leftsrc' => '', - 'leftlabel' => '', - 'leftcredit' => '', + "rightsrc" => "", + "rightlabel" => "", + "rightcredit" => "", + ], + $atts + ); - 'rightsrc' => '', - 'rightlabel' => '', - 'rightcredit' => '', - ), $atts ); - - return << - - + return << + + + EOT; + } - } - - static function init() { - wp_register_script( 'juxtapose', "//s3.amazonaws.com/cdn.knightlab.com/libs/juxtapose/latest/js/juxtapose.js", null, null, true ); - - } - - static function wp_footer() { - // Should be using wp_enqueue_style, but it can't be used to add styles to the footer. - // Yeah i know, inside is not valid HTML. - // But i don't want to load this css when there's not need to. - // SUE ME. - if(self::$shortcode_rendered){ - echo ''; - } - } + static function init() + { + wp_register_script( + "juxtapose", + "https://cdn.jsdelivr.net/npm/juxtaposejs/build/js/juxtapose.min.js", + null, + null, + true + ); + } + static function wp_footer() + { + // Should be using wp_enqueue_style, but it can't be used to add styles to the footer. + // Yeah i know, inside is not valid HTML. + // But i don't want to load this css when there's not need to. + // SUE ME. + if (self::$shortcode_rendered) { + echo ''; + } + } } -Juxtapose::initialize(); \ No newline at end of file +Juxtapose::initialize();