Plugin Directory

Changeset 3181089


Ignore:
Timestamp:
11/04/2024 07:22:24 AM (17 months ago)
Author:
freeleaf
Message:

ver 1.1.1

Location:
low-key-toolbar
Files:
6 edited
13 copied

Legend:

Unmodified
Added
Removed
  • low-key-toolbar/tags/1.1.1/admin/class-low-key-toolbar-admin.php

    r2882462 r3181089  
    5151        $this->plugin_name = $plugin_name;
    5252        $this->version     = $version;
    53 
    5453    }
    5554
     
    9897                'show_in_rest'      => true,
    9998                'default'           => LOW_KEY_TOOLBAR_OPACITY,
    100                 'sanitize_callback' => function( $value ) {
     99                'sanitize_callback' => function ( $value ) {
    101100                    return $this->check_number( $value );
    102101                },
     
    110109                'show_in_rest'      => true,
    111110                'default'           => LOW_KEY_TOOLBAR_SCALE,
    112                 'sanitize_callback' => function( $value ) {
     111                'sanitize_callback' => function ( $value ) {
    113112                    return $this->check_number( $value );
    114113                },
     
    122121                'show_in_rest'      => true,
    123122                'default'           => LOW_KEY_TOOLBAR_MARGIN,
    124                 'sanitize_callback' => function( $value ) {
     123                'sanitize_callback' => function ( $value ) {
    125124                    return $this->check_margin( $value, LOW_KEY_TOOLBAR_MARGIN );
    126125                },
     
    188187        wp_register_script(
    189188            $this->plugin_name,
    190             plugins_url( '/build/index.js', dirname( __FILE__ ) ),
     189            plugins_url( '/build/index.js', __DIR__ ),
    191190            $dependencies,
    192191            filemtime( plugin_dir_path( __DIR__ ) . 'build/index.js' ),
     
    200199            )
    201200        );
    202 
    203201    }
    204202
     
    250248     */
    251249    public function inline_css() {
    252         global $post,$pagenow;
     250        global $post, $pagenow;
    253251
    254252        if ( 'post.php' !== $pagenow && 'post-new.php' !== $pagenow ) {
     
    258256        if ( apply_filters( 'replace_editor', false, $post ) === true ) {
    259257            return;
    260         } else {
    261             if ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $post ) ) {
     258        } elseif ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $post ) ) {
    262259                return;
    263             }
    264260        }
    265261
     
    336332        wp_localize_script( $this->plugin_name, 'lktb_opt', $lktb_var );
    337333    }
    338 
    339334}
  • low-key-toolbar/tags/1.1.1/build/index.asset.php

    r2882462 r3181089  
    1 <?php return array('dependencies' => array('wp-api', 'wp-components', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '443c8dc3ce4db939ac72967b9078fb57');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api', 'wp-components', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c7070b9a68fbbef9ccba');
  • low-key-toolbar/tags/1.1.1/build/index.js

    r2882462 r3181089  
    1 (()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var o in l)e.o(l,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:l[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,l=window.wp.plugins,o=window.wp.api;var a=e.n(o);const n=window.wp.editPost,r=window.wp.components,c=window.wp.i18n,i=()=>(0,t.createElement)("svg",{width:"24px",viewBox:"0 0 104 50"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M80.815,42.956c-0,-1.242 -1.008,-2.25 -2.25,-2.25l-53.5,-0c-1.242,-0 -2.25,1.008 -2.25,2.25l-0,4.5c-0,1.242 1.008,2.25 2.25,2.25l53.5,-0c1.242,-0 2.25,-1.008 2.25,-2.25l-0,-4.5Z"}),(0,t.createElement)("path",{d:"M54.815,1.497c-0,-0.827 -0.672,-1.5 -1.5,-1.5l-3,0c-0.828,0 -1.5,0.673 -1.5,1.5l-0,13c-0,0.828 0.672,1.5 1.5,1.5l3,0c0.828,0 1.5,-0.672 1.5,-1.5l-0,-13Z"}),(0,t.createElement)("path",{d:"M24.518,8.694c-0.451,-0.695 -1.38,-0.892 -2.075,-0.441l-2.516,1.634c-0.694,0.451 -0.892,1.38 -0.441,2.075l7.08,10.902c0.451,0.695 1.381,0.892 2.075,0.441l2.516,-1.634c0.695,-0.45 0.892,-1.38 0.441,-2.075l-7.08,-10.902Z"}),(0,t.createElement)("path",{d:"M3.474,30.381c-0.75,-0.35 -1.643,-0.025 -1.993,0.726l-1.268,2.718c-0.35,0.751 -0.025,1.644 0.726,1.994l11.782,5.494c0.75,0.35 1.643,0.025 1.993,-0.726l1.268,-2.719c0.35,-0.75 0.025,-1.643 -0.726,-1.993l-11.782,-5.494Z"}),(0,t.createElement)("path",{d:"M84.906,12.532c0.463,-0.686 0.282,-1.619 -0.404,-2.082l-2.487,-1.677c-0.687,-0.463 -1.62,-0.282 -2.083,0.404l-7.269,10.778c-0.463,0.686 -0.282,1.619 0.404,2.082l2.488,1.678c0.686,0.463 1.619,0.281 2.082,-0.405l7.269,-10.778Z"}),(0,t.createElement)("path",{d:"M102.686,35.819c0.751,-0.35 1.076,-1.243 0.726,-1.994l-1.268,-2.718c-0.35,-0.751 -1.243,-1.076 -1.994,-0.726l-11.782,5.494c-0.75,0.35 -1.075,1.243 -0.725,1.993l1.268,2.719c0.35,0.751 1.243,1.076 1.993,0.726l11.782,-5.494Z"})));let s=()=>{let e=parseFloat(lktb_opt.opacity),l=parseFloat(lktb_opt.scale),o=parseFloat(lktb_opt.margin),n=""!==lktb_opt.on_flg&&lktb_opt.on_flg;const[i,s]=(0,t.useState)(e),[m,d]=(0,t.useState)(l),[_,p]=(0,t.useState)(o),[b,w]=(0,t.useState)(n);return(0,t.useEffect)((()=>{document.body.style.setProperty("--toolbar_opacity",String(i)),document.body.style.setProperty("--toolbar_scale",String(m)),document.body.style.setProperty("--toolbar_margin",String(_)),b?document.body.classList.add("is_hover_effect"):document.body.classList.remove("is_hover_effect"),a().loadPromise.then((()=>{new(a().models.Settings)({low_key_toolbar_on_flg:b,low_key_toolbar_opacity:i,low_key_toolbar_scale:m,low_key_toolbar_margin:_}).save()}))})),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.PanelBody,null,(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Opacity","low-key-toolbar"),value:i,initialPosition:e,min:.1,max:1,step:.1,onChange:e=>s(e)}),(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Scale","low-key-toolbar"),value:m,initialPosition:l,min:.1,max:1,step:.1,onChange:e=>d(e)}),(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Margin Bottom (px)","low-key-toolbar"),value:_,initialPosition:o,min:0,max:12,step:1,onChange:e=>p(e)})),(0,t.createElement)(r.PanelBody,null,(0,t.createElement)(r.ToggleControl,{label:(0,c.__)("When hovering, Return to original size","low-key-toolbar"),checked:b,onChange:()=>w(!b)})))};(0,l.registerPlugin)("low-key-toolbar",{icon:(0,t.createElement)(i,null),render:()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},(0,c.__)("Low-Key ToolBar setting","low-key-toolbar")),(0,t.createElement)(n.PluginSidebar,{name:"sidebar-name",icon:i,title:(0,c.__)("Low-Key ToolBar","low-key-toolbar")},(0,t.createElement)(s,null)))})})();
     1(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var l in t)e.o(t,l)&&!e.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:t[l]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.plugins,t=window.wp.api;var l=e.n(t);const a=window.wp.editor,n=window.wp.components,r=window.wp.element,i=window.wp.i18n,s=window.ReactJSXRuntime,c=()=>(0,s.jsx)("svg",{width:"24px",viewBox:"0 0 104 50",children:(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:"M80.815,42.956c-0,-1.242 -1.008,-2.25 -2.25,-2.25l-53.5,-0c-1.242,-0 -2.25,1.008 -2.25,2.25l-0,4.5c-0,1.242 1.008,2.25 2.25,2.25l53.5,-0c1.242,-0 2.25,-1.008 2.25,-2.25l-0,-4.5Z"}),(0,s.jsx)("path",{d:"M54.815,1.497c-0,-0.827 -0.672,-1.5 -1.5,-1.5l-3,0c-0.828,0 -1.5,0.673 -1.5,1.5l-0,13c-0,0.828 0.672,1.5 1.5,1.5l3,0c0.828,0 1.5,-0.672 1.5,-1.5l-0,-13Z"}),(0,s.jsx)("path",{d:"M24.518,8.694c-0.451,-0.695 -1.38,-0.892 -2.075,-0.441l-2.516,1.634c-0.694,0.451 -0.892,1.38 -0.441,2.075l7.08,10.902c0.451,0.695 1.381,0.892 2.075,0.441l2.516,-1.634c0.695,-0.45 0.892,-1.38 0.441,-2.075l-7.08,-10.902Z"}),(0,s.jsx)("path",{d:"M3.474,30.381c-0.75,-0.35 -1.643,-0.025 -1.993,0.726l-1.268,2.718c-0.35,0.751 -0.025,1.644 0.726,1.994l11.782,5.494c0.75,0.35 1.643,0.025 1.993,-0.726l1.268,-2.719c0.35,-0.75 0.025,-1.643 -0.726,-1.993l-11.782,-5.494Z"}),(0,s.jsx)("path",{d:"M84.906,12.532c0.463,-0.686 0.282,-1.619 -0.404,-2.082l-2.487,-1.677c-0.687,-0.463 -1.62,-0.282 -2.083,0.404l-7.269,10.778c-0.463,0.686 -0.282,1.619 0.404,2.082l2.488,1.678c0.686,0.463 1.619,0.281 2.082,-0.405l7.269,-10.778Z"}),(0,s.jsx)("path",{d:"M102.686,35.819c0.751,-0.35 1.076,-1.243 0.726,-1.994l-1.268,-2.718c-0.35,-0.751 -1.243,-1.076 -1.994,-0.726l-11.782,5.494c-0.75,0.35 -1.075,1.243 -0.725,1.993l1.268,2.719c0.35,0.751 1.243,1.076 1.993,0.726l11.782,-5.494Z"})]})});let d=()=>{let e=parseFloat(lktb_opt.opacity),o=parseFloat(lktb_opt.scale),t=parseFloat(lktb_opt.margin),a=""!==lktb_opt.on_flg&&lktb_opt.on_flg;const[c,d]=(0,r.useState)(e),[_,p]=(0,r.useState)(o),[w,b]=(0,r.useState)(t),[g,y]=(0,r.useState)(a);return(0,r.useEffect)((()=>{document.body.style.setProperty("--toolbar_opacity",String(c)),document.body.style.setProperty("--toolbar_scale",String(_)),document.body.style.setProperty("--toolbar_margin",String(w)),g?document.body.classList.add("is_hover_effect"):document.body.classList.remove("is_hover_effect"),l().loadPromise.then((()=>{new(l().models.Settings)({low_key_toolbar_on_flg:g,low_key_toolbar_opacity:c,low_key_toolbar_scale:_,low_key_toolbar_margin:w}).save()}))})),(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)(n.PanelBody,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Opacity","low-key-toolbar"),value:c,initialPosition:e,min:.1,max:1,step:.1,onChange:e=>d(e)}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Scale","low-key-toolbar"),value:_,initialPosition:o,min:.1,max:1,step:.1,onChange:e=>p(e)}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Margin Bottom (px)","low-key-toolbar"),value:w,initialPosition:t,min:0,max:12,step:1,onChange:e=>b(e)})]}),(0,s.jsx)(n.PanelBody,{children:(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("When hovering, Return to original size","low-key-toolbar"),checked:g,onChange:()=>y(!g)})})]})};(0,o.registerPlugin)("low-key-toolbar",{icon:(0,s.jsx)(c,{}),render:()=>(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(a.PluginSidebarMoreMenuItem,{target:"sidebar-name",children:(0,i.__)("Low-Key ToolBar setting","low-key-toolbar")}),(0,s.jsx)(a.PluginSidebar,{name:"sidebar-name",icon:c,title:(0,i.__)("Low-Key ToolBar","low-key-toolbar"),children:(0,s.jsx)(d,{})})]})})})();
  • low-key-toolbar/tags/1.1.1/low-key-toolbar.php

    r2882462 r3181089  
    55 * Requires at least: 5.7
    66 * Requires PHP:      7.4
    7  * Version:           1.1.0
     7 * Version:           1.1.1
    88 * Author:            Makoto Nakao
    99 * License:           GPL-2.0-or-later
     
    2222 * Define constant value.
    2323 */
    24 define( 'LOW_KEY_TOOLBAR_VERSION', '1.0.1' );
     24define( 'LOW_KEY_TOOLBAR_VERSION', '1.1.1' );
    2525define( 'LOW_KEY_TOOLBAR_OPACITY', 0.4 );
    2626define( 'LOW_KEY_TOOLBAR_SCALE', 0.6 );
     
    5151    $plugin = new Low_Key_Toolbar();
    5252    $plugin->run();
    53 
    5453}
    5554run_low_key_toolbar();
  • low-key-toolbar/tags/1.1.1/readme.txt

    r2882462 r3181089  
    22Contributors:      freeleaf
    33Tags:              editor,gutenberg,toolbar
    4 Stable tag:        1.1.0
    5 Tested up to:      6.2
    6 Requires at least: 5.7
     4Stable tag:        1.1.1
     5Tested up to:      6.7
     6Requires at least: 6.0
    77Requires PHP:      7.4
    88License:           GPL-2.0-or-later
     
    3939
    4040== Changelog ==
     41
     42= 1.1.1 =
     43* Fixed deprecation warning.
     44
    4145= 1.1.0 =
    4246* Now available for all post types.
  • low-key-toolbar/tags/1.1.1/src/sidebar/sidebar.js

    r2882462 r3181089  
    11import { registerPlugin } from "@wordpress/plugins";
    22import api from "@wordpress/api";
    3 import { PluginSidebar, PluginSidebarMoreMenuItem } from "@wordpress/edit-post";
     3import { PluginSidebar, PluginSidebarMoreMenuItem } from "@wordpress/editor";
    44import { PanelBody, ToggleControl, RangeControl } from "@wordpress/components";
    55import { useState, useEffect, Fragment } from "@wordpress/element";
     
    105105                    label={__(
    106106                        "When hovering, Return to original size",
    107                         "low-key-toolbar"
     107                        "low-key-toolbar",
    108108                    )}
    109109                    checked={showFlg}
  • low-key-toolbar/trunk/admin/class-low-key-toolbar-admin.php

    r2882462 r3181089  
    5151        $this->plugin_name = $plugin_name;
    5252        $this->version     = $version;
    53 
    5453    }
    5554
     
    9897                'show_in_rest'      => true,
    9998                'default'           => LOW_KEY_TOOLBAR_OPACITY,
    100                 'sanitize_callback' => function( $value ) {
     99                'sanitize_callback' => function ( $value ) {
    101100                    return $this->check_number( $value );
    102101                },
     
    110109                'show_in_rest'      => true,
    111110                'default'           => LOW_KEY_TOOLBAR_SCALE,
    112                 'sanitize_callback' => function( $value ) {
     111                'sanitize_callback' => function ( $value ) {
    113112                    return $this->check_number( $value );
    114113                },
     
    122121                'show_in_rest'      => true,
    123122                'default'           => LOW_KEY_TOOLBAR_MARGIN,
    124                 'sanitize_callback' => function( $value ) {
     123                'sanitize_callback' => function ( $value ) {
    125124                    return $this->check_margin( $value, LOW_KEY_TOOLBAR_MARGIN );
    126125                },
     
    188187        wp_register_script(
    189188            $this->plugin_name,
    190             plugins_url( '/build/index.js', dirname( __FILE__ ) ),
     189            plugins_url( '/build/index.js', __DIR__ ),
    191190            $dependencies,
    192191            filemtime( plugin_dir_path( __DIR__ ) . 'build/index.js' ),
     
    200199            )
    201200        );
    202 
    203201    }
    204202
     
    250248     */
    251249    public function inline_css() {
    252         global $post,$pagenow;
     250        global $post, $pagenow;
    253251
    254252        if ( 'post.php' !== $pagenow && 'post-new.php' !== $pagenow ) {
     
    258256        if ( apply_filters( 'replace_editor', false, $post ) === true ) {
    259257            return;
    260         } else {
    261             if ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $post ) ) {
     258        } elseif ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $post ) ) {
    262259                return;
    263             }
    264260        }
    265261
     
    336332        wp_localize_script( $this->plugin_name, 'lktb_opt', $lktb_var );
    337333    }
    338 
    339334}
  • low-key-toolbar/trunk/build/index.asset.php

    r2882462 r3181089  
    1 <?php return array('dependencies' => array('wp-api', 'wp-components', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '443c8dc3ce4db939ac72967b9078fb57');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api', 'wp-components', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c7070b9a68fbbef9ccba');
  • low-key-toolbar/trunk/build/index.js

    r2882462 r3181089  
    1 (()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var o in l)e.o(l,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:l[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,l=window.wp.plugins,o=window.wp.api;var a=e.n(o);const n=window.wp.editPost,r=window.wp.components,c=window.wp.i18n,i=()=>(0,t.createElement)("svg",{width:"24px",viewBox:"0 0 104 50"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M80.815,42.956c-0,-1.242 -1.008,-2.25 -2.25,-2.25l-53.5,-0c-1.242,-0 -2.25,1.008 -2.25,2.25l-0,4.5c-0,1.242 1.008,2.25 2.25,2.25l53.5,-0c1.242,-0 2.25,-1.008 2.25,-2.25l-0,-4.5Z"}),(0,t.createElement)("path",{d:"M54.815,1.497c-0,-0.827 -0.672,-1.5 -1.5,-1.5l-3,0c-0.828,0 -1.5,0.673 -1.5,1.5l-0,13c-0,0.828 0.672,1.5 1.5,1.5l3,0c0.828,0 1.5,-0.672 1.5,-1.5l-0,-13Z"}),(0,t.createElement)("path",{d:"M24.518,8.694c-0.451,-0.695 -1.38,-0.892 -2.075,-0.441l-2.516,1.634c-0.694,0.451 -0.892,1.38 -0.441,2.075l7.08,10.902c0.451,0.695 1.381,0.892 2.075,0.441l2.516,-1.634c0.695,-0.45 0.892,-1.38 0.441,-2.075l-7.08,-10.902Z"}),(0,t.createElement)("path",{d:"M3.474,30.381c-0.75,-0.35 -1.643,-0.025 -1.993,0.726l-1.268,2.718c-0.35,0.751 -0.025,1.644 0.726,1.994l11.782,5.494c0.75,0.35 1.643,0.025 1.993,-0.726l1.268,-2.719c0.35,-0.75 0.025,-1.643 -0.726,-1.993l-11.782,-5.494Z"}),(0,t.createElement)("path",{d:"M84.906,12.532c0.463,-0.686 0.282,-1.619 -0.404,-2.082l-2.487,-1.677c-0.687,-0.463 -1.62,-0.282 -2.083,0.404l-7.269,10.778c-0.463,0.686 -0.282,1.619 0.404,2.082l2.488,1.678c0.686,0.463 1.619,0.281 2.082,-0.405l7.269,-10.778Z"}),(0,t.createElement)("path",{d:"M102.686,35.819c0.751,-0.35 1.076,-1.243 0.726,-1.994l-1.268,-2.718c-0.35,-0.751 -1.243,-1.076 -1.994,-0.726l-11.782,5.494c-0.75,0.35 -1.075,1.243 -0.725,1.993l1.268,2.719c0.35,0.751 1.243,1.076 1.993,0.726l11.782,-5.494Z"})));let s=()=>{let e=parseFloat(lktb_opt.opacity),l=parseFloat(lktb_opt.scale),o=parseFloat(lktb_opt.margin),n=""!==lktb_opt.on_flg&&lktb_opt.on_flg;const[i,s]=(0,t.useState)(e),[m,d]=(0,t.useState)(l),[_,p]=(0,t.useState)(o),[b,w]=(0,t.useState)(n);return(0,t.useEffect)((()=>{document.body.style.setProperty("--toolbar_opacity",String(i)),document.body.style.setProperty("--toolbar_scale",String(m)),document.body.style.setProperty("--toolbar_margin",String(_)),b?document.body.classList.add("is_hover_effect"):document.body.classList.remove("is_hover_effect"),a().loadPromise.then((()=>{new(a().models.Settings)({low_key_toolbar_on_flg:b,low_key_toolbar_opacity:i,low_key_toolbar_scale:m,low_key_toolbar_margin:_}).save()}))})),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.PanelBody,null,(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Opacity","low-key-toolbar"),value:i,initialPosition:e,min:.1,max:1,step:.1,onChange:e=>s(e)}),(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Scale","low-key-toolbar"),value:m,initialPosition:l,min:.1,max:1,step:.1,onChange:e=>d(e)}),(0,t.createElement)(r.RangeControl,{label:(0,c.__)("Margin Bottom (px)","low-key-toolbar"),value:_,initialPosition:o,min:0,max:12,step:1,onChange:e=>p(e)})),(0,t.createElement)(r.PanelBody,null,(0,t.createElement)(r.ToggleControl,{label:(0,c.__)("When hovering, Return to original size","low-key-toolbar"),checked:b,onChange:()=>w(!b)})))};(0,l.registerPlugin)("low-key-toolbar",{icon:(0,t.createElement)(i,null),render:()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},(0,c.__)("Low-Key ToolBar setting","low-key-toolbar")),(0,t.createElement)(n.PluginSidebar,{name:"sidebar-name",icon:i,title:(0,c.__)("Low-Key ToolBar","low-key-toolbar")},(0,t.createElement)(s,null)))})})();
     1(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var l in t)e.o(t,l)&&!e.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:t[l]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.plugins,t=window.wp.api;var l=e.n(t);const a=window.wp.editor,n=window.wp.components,r=window.wp.element,i=window.wp.i18n,s=window.ReactJSXRuntime,c=()=>(0,s.jsx)("svg",{width:"24px",viewBox:"0 0 104 50",children:(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:"M80.815,42.956c-0,-1.242 -1.008,-2.25 -2.25,-2.25l-53.5,-0c-1.242,-0 -2.25,1.008 -2.25,2.25l-0,4.5c-0,1.242 1.008,2.25 2.25,2.25l53.5,-0c1.242,-0 2.25,-1.008 2.25,-2.25l-0,-4.5Z"}),(0,s.jsx)("path",{d:"M54.815,1.497c-0,-0.827 -0.672,-1.5 -1.5,-1.5l-3,0c-0.828,0 -1.5,0.673 -1.5,1.5l-0,13c-0,0.828 0.672,1.5 1.5,1.5l3,0c0.828,0 1.5,-0.672 1.5,-1.5l-0,-13Z"}),(0,s.jsx)("path",{d:"M24.518,8.694c-0.451,-0.695 -1.38,-0.892 -2.075,-0.441l-2.516,1.634c-0.694,0.451 -0.892,1.38 -0.441,2.075l7.08,10.902c0.451,0.695 1.381,0.892 2.075,0.441l2.516,-1.634c0.695,-0.45 0.892,-1.38 0.441,-2.075l-7.08,-10.902Z"}),(0,s.jsx)("path",{d:"M3.474,30.381c-0.75,-0.35 -1.643,-0.025 -1.993,0.726l-1.268,2.718c-0.35,0.751 -0.025,1.644 0.726,1.994l11.782,5.494c0.75,0.35 1.643,0.025 1.993,-0.726l1.268,-2.719c0.35,-0.75 0.025,-1.643 -0.726,-1.993l-11.782,-5.494Z"}),(0,s.jsx)("path",{d:"M84.906,12.532c0.463,-0.686 0.282,-1.619 -0.404,-2.082l-2.487,-1.677c-0.687,-0.463 -1.62,-0.282 -2.083,0.404l-7.269,10.778c-0.463,0.686 -0.282,1.619 0.404,2.082l2.488,1.678c0.686,0.463 1.619,0.281 2.082,-0.405l7.269,-10.778Z"}),(0,s.jsx)("path",{d:"M102.686,35.819c0.751,-0.35 1.076,-1.243 0.726,-1.994l-1.268,-2.718c-0.35,-0.751 -1.243,-1.076 -1.994,-0.726l-11.782,5.494c-0.75,0.35 -1.075,1.243 -0.725,1.993l1.268,2.719c0.35,0.751 1.243,1.076 1.993,0.726l11.782,-5.494Z"})]})});let d=()=>{let e=parseFloat(lktb_opt.opacity),o=parseFloat(lktb_opt.scale),t=parseFloat(lktb_opt.margin),a=""!==lktb_opt.on_flg&&lktb_opt.on_flg;const[c,d]=(0,r.useState)(e),[_,p]=(0,r.useState)(o),[w,b]=(0,r.useState)(t),[g,y]=(0,r.useState)(a);return(0,r.useEffect)((()=>{document.body.style.setProperty("--toolbar_opacity",String(c)),document.body.style.setProperty("--toolbar_scale",String(_)),document.body.style.setProperty("--toolbar_margin",String(w)),g?document.body.classList.add("is_hover_effect"):document.body.classList.remove("is_hover_effect"),l().loadPromise.then((()=>{new(l().models.Settings)({low_key_toolbar_on_flg:g,low_key_toolbar_opacity:c,low_key_toolbar_scale:_,low_key_toolbar_margin:w}).save()}))})),(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)(n.PanelBody,{children:[(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Opacity","low-key-toolbar"),value:c,initialPosition:e,min:.1,max:1,step:.1,onChange:e=>d(e)}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Scale","low-key-toolbar"),value:_,initialPosition:o,min:.1,max:1,step:.1,onChange:e=>p(e)}),(0,s.jsx)(n.RangeControl,{label:(0,i.__)("Margin Bottom (px)","low-key-toolbar"),value:w,initialPosition:t,min:0,max:12,step:1,onChange:e=>b(e)})]}),(0,s.jsx)(n.PanelBody,{children:(0,s.jsx)(n.ToggleControl,{label:(0,i.__)("When hovering, Return to original size","low-key-toolbar"),checked:g,onChange:()=>y(!g)})})]})};(0,o.registerPlugin)("low-key-toolbar",{icon:(0,s.jsx)(c,{}),render:()=>(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(a.PluginSidebarMoreMenuItem,{target:"sidebar-name",children:(0,i.__)("Low-Key ToolBar setting","low-key-toolbar")}),(0,s.jsx)(a.PluginSidebar,{name:"sidebar-name",icon:c,title:(0,i.__)("Low-Key ToolBar","low-key-toolbar"),children:(0,s.jsx)(d,{})})]})})})();
  • low-key-toolbar/trunk/low-key-toolbar.php

    r2882462 r3181089  
    55 * Requires at least: 5.7
    66 * Requires PHP:      7.4
    7  * Version:           1.1.0
     7 * Version:           1.1.1
    88 * Author:            Makoto Nakao
    99 * License:           GPL-2.0-or-later
     
    2222 * Define constant value.
    2323 */
    24 define( 'LOW_KEY_TOOLBAR_VERSION', '1.0.1' );
     24define( 'LOW_KEY_TOOLBAR_VERSION', '1.1.1' );
    2525define( 'LOW_KEY_TOOLBAR_OPACITY', 0.4 );
    2626define( 'LOW_KEY_TOOLBAR_SCALE', 0.6 );
     
    5151    $plugin = new Low_Key_Toolbar();
    5252    $plugin->run();
    53 
    5453}
    5554run_low_key_toolbar();
  • low-key-toolbar/trunk/readme.txt

    r2882462 r3181089  
    22Contributors:      freeleaf
    33Tags:              editor,gutenberg,toolbar
    4 Stable tag:        1.1.0
    5 Tested up to:      6.2
    6 Requires at least: 5.7
     4Stable tag:        1.1.1
     5Tested up to:      6.7
     6Requires at least: 6.0
    77Requires PHP:      7.4
    88License:           GPL-2.0-or-later
     
    3939
    4040== Changelog ==
     41
     42= 1.1.1 =
     43* Fixed deprecation warning.
     44
    4145= 1.1.0 =
    4246* Now available for all post types.
  • low-key-toolbar/trunk/src/sidebar/sidebar.js

    r2882462 r3181089  
    11import { registerPlugin } from "@wordpress/plugins";
    22import api from "@wordpress/api";
    3 import { PluginSidebar, PluginSidebarMoreMenuItem } from "@wordpress/edit-post";
     3import { PluginSidebar, PluginSidebarMoreMenuItem } from "@wordpress/editor";
    44import { PanelBody, ToggleControl, RangeControl } from "@wordpress/components";
    55import { useState, useEffect, Fragment } from "@wordpress/element";
     
    105105                    label={__(
    106106                        "When hovering, Return to original size",
    107                         "low-key-toolbar"
     107                        "low-key-toolbar",
    108108                    )}
    109109                    checked={showFlg}
Note: See TracChangeset for help on using the changeset viewer.