Plugin Directory

Changeset 2348890


Ignore:
Timestamp:
07/30/2020 08:09:31 AM (5 years ago)
Author:
mel_cha
Message:

commit version null

Location:
simple-definition-list-blocks/trunk
Files:
24 added
6 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • simple-definition-list-blocks/trunk

    • Property svn:ignore
      •  

        old new  
        11# A set of files you probably don't want in your WordPress.org distribution
        2 .babelrc
        3 .browserslistrc
        42.distignore
        5 .editorconfig
        6 .eslintignore
        7 .eslintrc.js
        83.gitignore
        9 .gitlab-ci.yml
        104.npmrc
        115.git
         6.idea
        127.travis.yml
        138.DS_Store
        149Thumbs.db
        1510behat.yml
        16 bitbucket-pipelines.yml
        1711bin
        18 .circleci/config.yml
        19 composer.json
        20 composer.lock
        21 Gruntfile.js
        22 webpack.config.js
        23 package.json
        24 package-lock.json
        25 phpunit.xml
        26 phpunit.xml.dist
        27 multisite.xml
        28 multisite.xml.dist
        29 .phpcs.xml
        30 phpcs.xml
        31 .phpcs.xml.dist
        32 phpcs.xml.dist
        33 README.md
         12.cache
        3413wp-cli.local.yml
        3514docker
        36 docker-compose.yml
        37 yarn.lock
        38 tests
        39 test
        40 *.test.js
        41 vendor
        4215node_modules
        4316*.sql
         17wordpress
        4418*.tar.gz
        4519*.zip
         20nightly
         21.nvmrc
         22.wp-env.json
  • simple-definition-list-blocks/trunk/readme.txt

    r2105728 r2348890  
    33Donate link:       https://www.amazon.jp/hz/wishlist/ls/1PNJLOPSM85GC?ref_=wl_share
    44Tags:              posts, blocks
    5 Requires at least: 5.2.1
     5Requires at least: 5.4.2
    66Tested up to:      5.2.1
    77Requires PHP:      7.0
    8 Stable tag:        0.1.5
     8Stable tag:        null
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2020== Changelog ==
    2121
     22= 0.2.0 =
     23* add HTML anchor for dt tag.
     24
    2225= 0.1.0 =
    2326* first release.
  • simple-definition-list-blocks/trunk/simple-definition-list-blocks.php

    r2105728 r2348890  
    88 * Text Domain:     simple-definition-list-blocks
    99 * Domain Path:     /languages
    10  * Version:         0.1.5
     10 * Version:         null
    1111 *
    1212 * @package         Simple_Definition_List_Blocks
    1313 */
    1414
    15 namespace Simple_Definition_List_Blocks;
    16 
    17 if ( ! defined( 'ABSPATH' ) ) {
    18     exit;
    19 }
    20 /**
    21  * Plugin file path.
    22 
    23  * @type string
    24  */
    25 const PLUGIN_FILE = __FILE__;
     15defined( 'ABSPATH' ) || exit;
    2616
    2717/**
    28  * Get plugin information.
    29  *
    30  * @return array {
    31  *     Array of plugin information for the strings.
    32  *
    33  *     @type string $Name        Plugin mame.
    34  *     @type string $PluginURI   Plugin URL.
    35  *     @type string $Version     Version.
    36  *     @type string $Description Description.
    37  *     @type string $Author      Author name.
    38  *     @type string $AuthorURI   Author URL.
    39  *     @type string $TextDomain  textdomain.
    40  *     @type string $DomainPath  mo file dir.
    41  *     @type string $Network     Multisite.
    42  * }
     18 * Block registration.
    4319 */
    44 function get_plugin_data() {
    45     static $data = null;
    46     if ( empty( $data ) ) {
    47         $data = \get_file_data(
    48             __FILE__,
    49             [
    50                 'Name'        => 'Plugin Name',
    51                 'PluginURI'   => 'Plugin URI',
    52                 'Version'     => 'Version',
    53                 'Description' => 'Description',
    54                 'Author'      => 'Author',
    55                 'AuthorURI'   => 'Author URI',
    56                 'TextDomain'  => 'Text Domain',
    57                 'DomainPath'  => 'Domain Path',
    58                 'Network'     => 'Network',
    59             ]
    60         );
    61     }
     20function simple_definition_list_blocks_register_block() {
     21    $asset_file = include plugin_dir_path( __FILE__ ) . 'build/index.asset.php';
     22    wp_register_script(
     23        'simple-definition-list-blocks',
     24        plugins_url( 'build/index.js', __FILE__ ),
     25        $asset_file['dependencies'],
     26        $asset_file['version'],
     27        true
     28    );
    6229
    63     return $data;
     30    wp_register_style(
     31        'simple-definition-list-blocks',
     32        plugins_url( 'build/index.css', __FILE__ ),
     33        array(),
     34        $asset_file['version']
     35    );
     36
     37    register_block_type(
     38        'simple-definition-list-blocks/list',
     39        array(
     40            'editor_script' => 'simple-definition-list-blocks',
     41            'style'         => 'simple-definition-list-blocks',
     42        )
     43    );
     44
     45    register_block_type(
     46        'simple-definition-list-blocks/term',
     47        array(
     48            'editor_script' => 'simple-definition-list-blocks',
     49            'style'         => 'simple-definition-list-blocks',
     50        )
     51    );
     52
     53    register_block_type(
     54        'simple-definition-list-blocks/details',
     55        array(
     56            'editor_script' => 'simple-definition-list-blocks',
     57            'style'         => 'simple-definition-list-blocks',
     58        )
     59    );
    6460}
    6561
    66 require_once dirname( __FILE__ ) . '/src/init.php';
     62add_action( 'init', 'simple_definition_list_blocks_register_block' );
  • simple-definition-list-blocks/trunk/src

    • Property svn:ignore
      •  

        old new  
        11# A set of files you probably don't want in your WordPress.org distribution
        2 .babelrc
        3 .browserslistrc
        42.distignore
        5 .editorconfig
        6 .eslintignore
        7 .eslintrc.js
        83.gitignore
        9 .gitlab-ci.yml
        104.npmrc
        115.git
         6.idea
        127.travis.yml
        138.DS_Store
        149Thumbs.db
        1510behat.yml
        16 bitbucket-pipelines.yml
        1711bin
        18 .circleci/config.yml
        19 composer.json
        20 composer.lock
        21 Gruntfile.js
        22 webpack.config.js
        23 package.json
        24 package-lock.json
        25 phpunit.xml
        26 phpunit.xml.dist
        27 multisite.xml
        28 multisite.xml.dist
        29 .phpcs.xml
        30 phpcs.xml
        31 .phpcs.xml.dist
        32 phpcs.xml.dist
        33 README.md
         12.cache
        3413wp-cli.local.yml
        3514docker
        36 docker-compose.yml
        37 yarn.lock
        38 tests
        39 test
        40 *.test.js
        41 vendor
        4215node_modules
        4316*.sql
         17wordpress
        4418*.tar.gz
        4519*.zip
         20nightly
         21.nvmrc
         22.wp-env.json
  • simple-definition-list-blocks/trunk/src/blocks

    • Property svn:ignore
      •  

        old new  
        11# A set of files you probably don't want in your WordPress.org distribution
        2 .babelrc
        3 .browserslistrc
        42.distignore
        5 .editorconfig
        6 .eslintignore
        7 .eslintrc.js
        83.gitignore
        9 .gitlab-ci.yml
        104.npmrc
        115.git
         6.idea
        127.travis.yml
        138.DS_Store
        149Thumbs.db
        1510behat.yml
        16 bitbucket-pipelines.yml
        1711bin
        18 .circleci/config.yml
        19 composer.json
        20 composer.lock
        21 Gruntfile.js
        22 webpack.config.js
        23 package.json
        24 package-lock.json
        25 phpunit.xml
        26 phpunit.xml.dist
        27 multisite.xml
        28 multisite.xml.dist
        29 .phpcs.xml
        30 phpcs.xml
        31 .phpcs.xml.dist
        32 phpcs.xml.dist
        33 README.md
         12.cache
        3413wp-cli.local.yml
        3514docker
        36 docker-compose.yml
        37 yarn.lock
        38 tests
        39 test
        40 *.test.js
        41 vendor
        4215node_modules
        4316*.sql
         17wordpress
        4418*.tar.gz
        4519*.zip
         20nightly
         21.nvmrc
         22.wp-env.json
  • simple-definition-list-blocks/trunk/src/blocks/definition-list

    • Property svn:ignore
      •  

        old new  
        11# A set of files you probably don't want in your WordPress.org distribution
        2 .babelrc
        3 .browserslistrc
        42.distignore
        5 .editorconfig
        6 .eslintignore
        7 .eslintrc.js
        83.gitignore
        9 .gitlab-ci.yml
        104.npmrc
        115.git
         6.idea
        127.travis.yml
        138.DS_Store
        149Thumbs.db
        1510behat.yml
        16 bitbucket-pipelines.yml
        1711bin
        18 .circleci/config.yml
        19 composer.json
        20 composer.lock
        21 Gruntfile.js
        22 webpack.config.js
        23 package.json
        24 package-lock.json
        25 phpunit.xml
        26 phpunit.xml.dist
        27 multisite.xml
        28 multisite.xml.dist
        29 .phpcs.xml
        30 phpcs.xml
        31 .phpcs.xml.dist
        32 phpcs.xml.dist
        33 README.md
         12.cache
        3413wp-cli.local.yml
        3514docker
        36 docker-compose.yml
        37 yarn.lock
        38 tests
        39 test
        40 *.test.js
        41 vendor
        4215node_modules
        4316*.sql
         17wordpress
        4418*.tar.gz
        4519*.zip
         20nightly
         21.nvmrc
         22.wp-env.json
  • simple-definition-list-blocks/trunk/src/blocks/definition-list/index.js

    r2105182 r2348890  
    1 import './list';
    2 import './term';
    3 import './details';
     1import { __ } from '@wordpress/i18n';
     2import { registerBlockType } from '@wordpress/blocks';
     3import { InnerBlocks } from '@wordpress/block-editor';
     4
     5const ALLOWED_BLOCKS = [
     6    'simple-definition-list-blocks/term',
     7    'simple-definition-list-blocks/details',
     8];
     9const listSettings = {
     10    title: __(
     11        'definition list (Simple Definition List Blocks)',
     12        'simple-definition-list-blocks'
     13    ),
     14    description: __(
     15        'Display a definition list. Add a term or details.',
     16        'simple-definition-list-blocks'
     17    ),
     18    icon: 'admin-page',
     19    category: 'formatting',
     20    keywords: [ __( 'definition', 'simple-definition-list-blocks', 'dl' ) ],
     21
     22    edit( { className } ) {
     23        return (
     24            <dl className={ className }>
     25                <InnerBlocks allowedBlocks={ ALLOWED_BLOCKS } />
     26            </dl>
     27        );
     28    },
     29
     30    save( { className } ) {
     31        return (
     32            <dl className={ className }>
     33                <InnerBlocks.Content />
     34            </dl>
     35        );
     36    },
     37};
     38
     39registerBlockType( 'simple-definition-list-blocks/list', listSettings );
Note: See TracChangeset for help on using the changeset viewer.