diff options
Diffstat (limited to 'plugins/jetpack/wp-cli-templates')
6 files changed, 0 insertions, 135 deletions
diff --git a/plugins/jetpack/wp-cli-templates/block-edit-js.mustache b/plugins/jetpack/wp-cli-templates/block-edit-js.mustache deleted file mode 100644 index 0894ffec..00000000 --- a/plugins/jetpack/wp-cli-templates/block-edit-js.mustache +++ /dev/null @@ -1,27 +0,0 @@ -/** - * External dependencies - */ -import { __ } from '@wordpress/i18n'; -import { Component } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import './editor.scss'; - -class {{ className }}Edit extends Component { - /** - * Write the block editor UI. - * - * @returns {object} The UI displayed when user edits this block. - */ - render() { - const { attributes, setAttributes } = this.props; - - return ( - <p>{ __( 'Block edit goes here', 'jetpack' ) }</p> - ); - } -} - -export default {{ className }}Edit; diff --git a/plugins/jetpack/wp-cli-templates/block-editor-js.mustache b/plugins/jetpack/wp-cli-templates/block-editor-js.mustache deleted file mode 100644 index d05f4039..00000000 --- a/plugins/jetpack/wp-cli-templates/block-editor-js.mustache +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Internal dependencies - */ -import registerJetpackBlock from '../../shared/register-jetpack-block'; -import { name, settings } from '.'; - -registerJetpackBlock( name, settings ); diff --git a/plugins/jetpack/wp-cli-templates/block-editor-scss.mustache b/plugins/jetpack/wp-cli-templates/block-editor-scss.mustache deleted file mode 100644 index a61482ad..00000000 --- a/plugins/jetpack/wp-cli-templates/block-editor-scss.mustache +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Editor styles for {{title}} - */ - -.wp-block-jetpack-{{slug}} { } diff --git a/plugins/jetpack/wp-cli-templates/block-index-js.mustache b/plugins/jetpack/wp-cli-templates/block-index-js.mustache deleted file mode 100644 index 236dcfa4..00000000 --- a/plugins/jetpack/wp-cli-templates/block-index-js.mustache +++ /dev/null @@ -1,67 +0,0 @@ -/** - * External dependencies - */ -import { __{{#hasKeywords}}, _x{{/hasKeywords}} } from '@wordpress/i18n'; -import { ExternalLink, Path } from '@wordpress/components'; -import { Fragment } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import renderMaterialIcon from '../../shared/render-material-icon'; -import edit from './edit'; - -/** - * Style dependencies - */ -import './editor.scss'; - -export const name = '{{ slug }}'; -export const title = __( '{{ title }}', 'jetpack' ); -export const settings = { - title, - - description: ( - <Fragment> - <p>{ __( '{{ description }}', 'jetpack' ) }</p> - <ExternalLink href="#">{ __( 'Learn more about {{ title }}', 'jetpack' ) }</ExternalLink> - </Fragment> - ), - - /* @TODO Add the icon. You can use one of these https://material.io/tools/icons/?style=outline */ - icon: renderMaterialIcon( - <Path d="M9 15h2V9H9v6zm1-10c-.5 0-1 .5-1 1s.5 1 1 1 1-.5 1-1-.5-1-1-1zm0-4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z" /> - ), - - category: 'jetpack', - - keywords: [{{#keywords}}_x( '{{ keyword }}', 'block search term', 'jetpack' ), {{/keywords}}], - - supports: { - // Support for block's alignment (left, center, right, wide, full). When true, it adds block controls to change block’s alignment. - align: false, /* if set to true, the 'align' option below can be used*/ - // Pick which alignment options to display. - /*align: [ 'left', 'right', 'full' ],*/ - // Support for wide alignment, that requires additional support in themes. - alignWide: true, - // When true, a new field in the block sidebar allows to define an id for the block and a button to copy the direct link. - anchor: false, - // When true, a new field in the block sidebar allows to define a custom className for the block’s wrapper. - customClassName: true, - // When false, Gutenberg won't add a class like .wp-block-your-block-name to the root element of your saved markup - className: true, - // Setting this to false suppress the ability to edit a block’s markup individually. We often set this to false in Jetpack blocks. - html: false, - // Passing false hides this block in Gutenberg's visual inserter. - /*inserter: true,*/ - // When false, user will only be able to insert the block once per post. - multiple: true, - // When false, the block won't be available to be converted into a reusable block. - reusable: true, - }, - - edit, - - /* @TODO Write the block editor output */ - save: () => null, -}; diff --git a/plugins/jetpack/wp-cli-templates/block-register-php.mustache b/plugins/jetpack/wp-cli-templates/block-register-php.mustache deleted file mode 100644 index 02cbf7da..00000000 --- a/plugins/jetpack/wp-cli-templates/block-register-php.mustache +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * {{ title }} Block. - * - * @since 7.x - * - * @package Jetpack - */ - -jetpack_register_block( - 'jetpack/{{ slug }}', - array( 'render_callback' => 'jetpack_{{ underscoredSlug }}_block_load_assets' ) -); - -/** - * {{ title }} block registration/dependency declaration. - * - * @param array $attr Array containing the {{ title }} block attributes. - * @param string $content String containing the {{ title }} block content. - * - * @return string - */ -function jetpack_{{ underscoredSlug }}_block_load_assets( $attr, $content ) { - Jetpack_Gutenberg::load_assets_as_required( '{{ slug }}' ); - return $content; -} diff --git a/plugins/jetpack/wp-cli-templates/readme.md b/plugins/jetpack/wp-cli-templates/readme.md deleted file mode 100644 index 352edc8d..00000000 --- a/plugins/jetpack/wp-cli-templates/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Templates - -These templates are used by the `wp jetpack block` WP-CLI command. They're used to generate files that are written to build an skeleton for a Jetpack block. |