Plugin Directory

Changeset 2168427


Ignore:
Timestamp:
10/04/2019 07:13:11 PM (6 years ago)
Author:
vindl
Message:

Update to 0.9

Location:
full-site-editing/trunk
Files:
9 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • full-site-editing/trunk/full-site-editing-plugin.php

    r2164036 r2168427  
    33 * Plugin Name: Full Site Editing
    44 * Description: Enhances your page creation workflow within the Block Editor.
    5  * Version: 0.7.1
     5 * Version: 0.9
    66 * Author: Automattic
    77 * Author URI: https://automattic.com/wordpress-plugins/
     
    2121 * @var string
    2222 */
    23 define( 'PLUGIN_VERSION', '0.7.1' );
     23define( 'PLUGIN_VERSION', '0.9' );
    2424
    2525// Themes which are supported by Full Site Editing (not the same as the SPT themes).
  • full-site-editing/trunk/full-site-editing/blocks/post-content/style.scss

    r2152004 r2168427  
    11.post-content-block.alignfull {
    22    padding: 0 12px;
     3
     4    @media ( max-width: 768px ) {
     5        overflow-x: hidden;
     6    }
    37}
    48
     
    3842// TODO: Replace the magic numbers!
    3943.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] {
    40     max-width: calc( 100vw - 81px );
    41     margin-left: 3px;
    42     margin-right: 3px;
     44    @media ( max-width: 768px ) {
     45        max-width: 768px;
     46        margin-left: 0;
     47        margin-right: 0;
     48
     49        .block-editor-block-mover {
     50            left: 60px;
     51        }
     52    }
     53    @media ( min-width: 768px ) {
     54        max-width: calc( 100vw - 81px );
     55        margin-left: 3px;
     56        margin-right: 3px;
     57    }
    4358}
    4459
  • full-site-editing/trunk/full-site-editing/blocks/template/edit.js

    r2152004 r2168427  
     1/* eslint-disable import/no-extraneous-dependencies */
    12/* eslint-disable wpcalypso/jsx-classname-namespace */
    23/* global fullSiteEditing */
     
    3334        const { templateId } = attributes;
    3435        const currentPostId = getCurrentPostId();
    35         const template = templateId && getEntityRecord( 'postType', 'wp_template', templateId );
     36        const template = templateId && getEntityRecord( 'postType', 'wp_template_part', templateId );
    3637        const editTemplateUrl = addQueryArgs( fullSiteEditing.editTemplateBaseUrl, {
    3738            post: templateId,
     
    6364
    6465                const templateBlocks = parse( get( template, [ 'content', 'raw' ], '' ) );
    65                 const templateBlock = createBlock( 'core/template', {}, templateBlocks );
     66                const templateBlock = createBlock( 'core/group', {}, templateBlocks );
    6667
    6768                receiveBlocks( [ templateBlock ] );
     
    132133        };
    133134
     135        /**
     136         * IMPORTANT: Be careful about changes to the overlay button. There is code in
     137         * iframe-bridge-server.js (setupEditTemplateLinks) which looks for two
     138         * elements matching '.template__block-container .template-block__overlay a'.
     139         * This code updates the href of the button to match the calypso URL (which is
     140         * sent through the iFrame port) since editTemplateUrl here will be the wpadmin URL.
     141         *
     142         * If you make changes to the button, navigation to the template editor MAY BREAK.
     143         *
     144         * For example, if the button does not exist in the DOM as the editor is loaded,
     145         * the links may not be updated in time, or an interval will continuously try to
     146         * find them (which is bad for performance).
     147         *
     148         * This has already broken several times, so be careful!
     149         */
     150
    134151        return (
    135152            <div
  • full-site-editing/trunk/full-site-editing/blocks/template/index.js

    r2152004 r2168427  
    1515import './site-logo';
    1616
    17 if ( 'wp_template' !== fullSiteEditing.editorPostType ) {
     17if ( 'wp_template_part' !== fullSiteEditing.editorPostType ) {
    1818    registerBlockType( 'a8c/template', {
    19         title: __( 'Template' ),
    20         description: __( 'Display a template.' ),
     19        title: __( 'Template Part' ),
     20        description: __( 'Display a Template Part.' ),
    2121        icon: 'layout',
    2222        category: 'layout',
  • full-site-editing/trunk/full-site-editing/blocks/template/style.scss

    r2152004 r2168427  
    8686
    8787// Hide the site logo description and buttons when not editing the Template
    88 .block-editor-page:not( .post-type-wp_template ) {
     88.block-editor-page:not( .post-type-wp_template_part ) {
    8989    .fse-site-logo {
    9090        .components-placeholder__fieldset, .components-placeholder__instructions {
  • full-site-editing/trunk/full-site-editing/class-full-site-editing.php

    r2152004 r2168427  
    2424     * @var array
    2525     */
    26     private $template_post_types = [ 'wp_template' ];
     26    private $template_post_types = [ 'wp_template_part' ];
    2727
    2828    /**
     
    107107        }
    108108
    109         if ( ! $this->wp_template_inserter->is_template_data_inserted() ) {
    110             $this->wp_template_inserter->insert_default_template_data();
    111         }
    112 
    113         if ( ! $this->wp_template_inserter->is_pages_data_inserted() ) {
    114             $this->wp_template_inserter->insert_default_pages();
    115         }
     109        $this->wp_template_inserter->insert_default_template_data();
     110        $this->wp_template_inserter->insert_default_pages();
    116111    }
    117112
     
    562557     */
    563558    public function remove_delete_row_action_for_template_taxonomy( $actions, $term ) {
    564         if ( 'wp_template_type' === $term->taxonomy ) {
     559        if ( 'wp_template_part_type' === $term->taxonomy ) {
    565560            unset( $actions['delete'] );
    566561        }
     
    586581     */
    587582    public function restrict_template_taxonomy_deletion( $term, $taxonomy ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
    588         if ( 'wp_template_type' === $taxonomy ) {
     583        if ( 'wp_template_part_type' === $taxonomy ) {
    589584            wp_die( esc_html__( 'Template Types cannon be deleted.' ) );
    590585        }
  • full-site-editing/trunk/full-site-editing/dist/full-site-editing.css

    r2152004 r2168427  
    1 .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-left:3px;margin-right:3px}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;left:0;margin:0;opacity:0;padding:0;position:absolute;right:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template) .fse-site-logo .components-placeholder__instructions{display:none}.edit-post-fullscreen-mode-close__toolbar a.is-button.is-default{height:auto}.edit-post-fullscreen-mode-close__toolbar a.is-button.is-default span{display:none}.edit-post-fullscreen-mode-close__toolbar a.a8c-close-button{padding:4px}.post-type-wp_template .edit-post-post-status,.post-type-wp_template .editor-post-title,.post-type-wp_template .editor-post-trash{display:none}.post-type-wp_template .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template .editor-post-switch-to-draft{display:none}.post-type-page .edit-post-layout__content,.post-type-wp_template .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template .edit-post-layout__content .edit-post-visual-editor{flex:none;margin:36px 32px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media (max-width:768px){.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template .edit-post-layout__content .edit-post-visual-editor{margin:0}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
     1.wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-left:0;margin-right:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{left:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-left:3px;margin-right:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;left:0;margin:0;opacity:0;padding:0;position:absolute;right:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
  • full-site-editing/trunk/full-site-editing/dist/full-site-editing.js

    r2152004 r2168427  
    1 !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=43)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.editor}()},function(t,e,n){var r=n(10);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(n,!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}},function(t,e){!function(){t.exports=this.lodash}()},function(t,e,n){var r;
     1!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=42)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.editor}()},function(t,e,n){var r=n(10);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(n,!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}},function(t,e){!function(){t.exports=this.lodash}()},function(t,e,n){var r;
    22/*!
    33  Copyright (c) 2017 Jed Watson.
     
    1010  http://jedwatson.github.io/classnames
    1111*/
    12 !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&t.push(c)}else if("object"===i)for(var l in r)n.call(r,l)&&r[l]&&t.push(l)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(){t.exports=this.wp.hooks}()},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){!function(){t.exports=this.wp.domReady}()},function(t,e){!function(){t.exports=this.wp.keycodes}()},function(t,e,n){var r=n(33),o=n(34),i=n(35);t.exports=function(t,e){return r(t)||o(t,e)||i()}},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e,n){},function(t,e){!function(){t.exports=this.wp.serverSideRender}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(29),o=n(30);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(31);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e){!function(){t.exports=this.wp.url}()},function(t,e,n){var r=n(39),o=n(40),i=n(41);t.exports=function(t){return r(t)||o(t)||i()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e,n){},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var c,l=t[Symbol.iterator]();!(r=(c=l.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(4),i=n(1),c=n(19),l=n.n(c),a=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.a,{block:"a8c/navigation-menu"}))},s=(n(28),Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(o.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus."),icon:s,category:"layout",supports:{align:["wide","full"],html:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:a,save:function(){return null}});var u=n(12),p=n.n(u),d=n(3),f=n(9),b=n(10),m=n.n(b),O=n(20),g=n.n(O),v=n(21),h=n.n(v),y=n(22),j=n.n(y),w=n(23),E=n.n(w),S=n(24),k=n.n(S),_=n(8),P=n.n(_),x=n(2),T=n(5),I=function(t){function e(){return g()(this,e),j()(this,E()(e).apply(this,arguments))}return k()(e,t),h()(e,[{key:"toggleEditing",value:function(){var t=this.props,e=t.isEditing;(0,t.setState)({isEditing:!e})}},{key:"onSelectPost",value:function(t){var e=t.id,n=t.type;this.props.setState({isEditing:!1,selectedPostId:e,selectedPostType:n})}},{key:"render",value:function(){var t=this.props.attributes.align;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:P()("post-content-block",m()({},"align".concat(t),t))},Object(r.createElement)(T.PostTitle,null),Object(r.createElement)(T.InnerBlocks,{templateLock:!1})))}}]),e}(r.Component),B=Object(d.compose)([Object(d.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(x.withSelect)(function(t,e){var n=e.selectedPostId,r=e.selectedPostType;return{selectedPost:(0,t("core").getEntityRecord)("postType",r,n)}})])(I);n(32);Object(o.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content"),description:Object(i.__)("The page content."),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:B,save:function(){return Object(r.createElement)(T.InnerBlocks.Content,null)}});var C=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/post-content"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"post-content__block"}))}},"addContentSlotClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",C,9);var D=n(14),N=n(6),L=n.n(N),A=n(15),M=n.n(A),F=n(16),R=n.n(F),U=n(17);function H(t){var e=Object(r.useRef)();return Object(r.useEffect)(function(){e.current=t},[t]),e.current}function z(t,e,n,o,c,l){var a=Object(r.useState)({option:e,previousOption:"",loaded:!1,error:!1}),s=M()(a,2),u=s[0],p=s[1],d=H(o),f=H(c);function b(){p(L()({},u,{option:u.previousOption,isSaving:!1}))}return Object(r.useEffect)(function(){u.loaded||u.error?function(){var e=u.option,r=u.previousOption,l=e&&e.trim()===r.trim(),a=!e||0===e.trim().length;!o&&d&&a&&b();if(!c||l)return;!f&&c&&function(e){p(L()({},u,{isSaving:!0})),R()({path:"/wp/v2/settings",method:"POST",data:m()({},t,e)}).then(function(){return function(t){p(L()({},u,{previousOption:t,isDirty:!1,isSaving:!1}))}(e)}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s"),t)),b()})}(e)}():R()({path:"/wp/v2/settings"}).then(function(e){return p(L()({},u,{option:Object(U.decodeEntities)(e[t]),previousOption:Object(U.decodeEntities)(e[t]),loaded:!0,error:!1}))}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s"),t)),p(L()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s"),t),error:!0}))})}),{siteOptions:u,handleChange:function(t){l({updated:Date.now()}),p(L()({},u,{option:t}))}}}var q=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,l=r.isCurrentPostPublished,a=t("core/block-editor"),s=a.getBlockIndex,u=a.getBlockRootClientId,p=a.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&l()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,l=t.setAttributes,a=t.isLocked,s=t.insertDefaultBlock,u=z("description",Object(i.__)("Site description loading…"),n,c,o,l),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-description",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),a||s())},placeholder:Object(i.__)("Add a Site Description"),"aria-label":Object(i.__)("Site Description")}))});n(36);Object(o.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description"),description:Object(i.__)("Site description, also known as the tagline."),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:q,save:function(){return null}});var V=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,l=r.isCurrentPostPublished,a=t("core/block-editor"),s=a.getBlockIndex,u=a.getBlockRootClientId,p=a.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&l()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,l=t.setAttributes,a=t.isLocked,s=t.insertDefaultBlock,u=z("title",Object(i.__)("Site title loading…"),n,c,o,l),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-title",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),a||s())},placeholder:Object(i.__)("Add a Site Title"),"aria-label":Object(i.__)("Site Title")}))});n(37);Object(o.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title"),description:Object(i.__)("Your site title."),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:V,save:function(){return null}});var G=n(7),W=n(11),K=n(25),Q=(n(18),Object(d.compose)(Object(d.withState)({templateClientId:null}),Object(x.withSelect)(function(t,e){var n=e.attributes,r=e.templateClientId,o=t("core").getEntityRecord,i=t("core/editor"),c=i.getCurrentPostId,l=i.isEditedPostDirty,a=t("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,p=t("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=c(),b=d&&o("postType","wp_template",d),m=Object(K.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),O=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(r),templateTitle:Object(G.get)(b,["title","rendered"],""),isDirty:l(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:O&&"a8c/template"===O.name}}),Object(x.withDispatch)(function(t,e){var n=t("core/block-editor").receiveBlocks,r=t("core/edit-post").openGeneralSidebar,i=e.template,c=e.templateClientId,l=e.setState;return{savePost:t("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!c){var t=Object(o.parse)(Object(G.get)(i,["content","raw"],"")),e=Object(o.createBlock)("core/template",{},t);n([e]),l({templateClientId:e.clientId})}},openGeneralSidebar:r}}))(function(t){var e,n=t.attributes,o=t.editTemplateUrl,c=t.receiveTemplateBlocks,l=t.template,a=t.templateBlock,s=t.templateTitle,u=t.isDirty,p=t.savePost,d=t.isEditorSidebarOpened,f=t.openGeneralSidebar,b=t.isAnyTemplateBlockSelected;if(!l)return Object(r.createElement)(W.Placeholder,null,Object(r.createElement)(W.Spinner,null));var O=Object(r.createRef)(),g=Object(r.useState)(!1),v=M()(g,2),h=v[0],y=v[1];Object(r.useEffect)(function(){h&&!u&&O.current.click(),c()}),Object(r.useEffect)(function(){var t=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(d&&t){if(b)return f("edit-post/document"),void t.classList.add("hidden");t.classList.remove("hidden")}},[b,d,f]);var j=n.align,w=n.className;return Object(r.createElement)("div",{className:P()("template-block",(e={},m()(e,"align".concat(j),j),m()(e,"is-navigating-to-template",h),e))},a&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(W.Disabled,null,Object(r.createElement)("div",{className:w},Object(r.createElement)(T.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:G.noop}))),Object(r.createElement)(W.Placeholder,{className:"template-block__overlay"},h&&Object(r.createElement)("div",{className:"template-block__loading"},Object(r.createElement)(W.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading %s Editor"),s)),Object(r.createElement)(W.Button,{className:h?"hidden":null,href:o,onClick:function(t){y(!0),u&&(t.preventDefault(),p())},isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s"),s)))))})),Y=Object(d.createHigherOrderComponent)(function(t){return function(e){return"fse-site-logo"!==e.attributes.className?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__site-logo"}))}},"addFSESiteLogoClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",Y),"wp_template"!==fullSiteEditing.editorPostType&&Object(o.registerBlockType)("a8c/template",{title:Object(i.__)("Template"),description:Object(i.__)("Display a template."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Q,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var J=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/template"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__block-container"}))}},"addFSETemplateClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",J,9);var X=n(13),Z=n.n(X);n(38);Z()(function(){var t=fullSiteEditing,e=t.closeButtonLabel,n=t.closeButtonUrl,r=t.editorPostType,o=setInterval(function(){var t=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");if(t)if(clearInterval(o),"wp_template"===r&&n){var i=document.createElement("a");i.href=n,i.innerHTML=e,i.className="components-button components-icon-button is-button is-default",i.setAttribute("aria-label",e),document.querySelector(".edit-post-fullscreen-mode-close__toolbar").replaceChild(i,t)}else t.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" viewBox="0 0 20 20"><path d="M14.95 6.46l-3.54 3.54 3.54 3.54-1.41 1.41-3.54-3.53-3.53 3.53-1.42-1.42 3.53-3.53-3.53-3.53 1.42-1.42 3.53 3.53 3.54-3.53z"></path></svg>',t.classList.add("a8c-close-button")})});var $=n(26),tt=n.n($),et=n(27),nt=Object(x.withSelect)(function(t){var e=t("core").getEntityRecord,n=t("core/editor").getEditedPostAttribute;return{templateClasses:Object(G.map)(n("template_types"),function(t){var n=Object(G.get)(e("taxonomy","wp_template_type",t),"name","");return Object(G.endsWith)(n,"-header")?"site-header site-branding":Object(G.endsWith)(n,"-footer")?"site-footer":void 0})}})(function(t){var e=t.templateClasses,n=setInterval(function(){var t=document.querySelector(".block-editor-writing-flow.editor-writing-flow > div");t&&(clearInterval(n),t.className=P.a.apply(void 0,["a8c-template-editor"].concat(tt()(e))))});return null});"wp_template"===fullSiteEditing.editorPostType&&Object(et.registerPlugin)("fse-editor-template-classes",{render:nt}),Z()(function(){"wp_template"===fullSiteEditing.editorPostType&&Object(x.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site."),{isDismissible:!1})});var rt=Object(d.compose)(Object(x.withSelect)(function(t){var e=t("core/editor"),n=e.getBlocks,r=e.getEditorSettings,o=t("core/edit-post").getEditorMode,i=n().find(function(t){return"a8c/post-content"===t.name});return{rootClientId:i?i.clientId:"",showInserter:"visual"===o()&&r().richEditingEnabled}}))(function(t){var e=t.rootClientId,n=t.showInserter;return Object(r.createElement)(T.Inserter,{rootClientId:e,disabled:!n,position:"bottom right"})});Z()(function(){return function(){if("page"===fullSiteEditing.editorPostType)var t=setInterval(function(){var e=document.querySelector(".edit-post-header-toolbar");if(e){clearInterval(t);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),e.insertBefore(n,e.firstChild),Object(r.render)(Object(r.createElement)(rt,null),n)}})}()});var ot=Object(x.subscribe)(function(){if("page"!==fullSiteEditing.editorPostType)return ot();!1===Object(x.select)("core/editor").isValidTemplate()&&Object(x.dispatch)("core/editor").setTemplateValidity(!0)}),it=["logo","brand","emblem","hallmark"];Object(f.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",function(t,e){return"core/image"!==e?t:t=Object(G.assign)({},t,{keywords:t.keywords.concat(it)})});n(42);Object(x.use)(function(t){return{dispatch:function(e){var n=L()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;return"core/editor"===e&&n.trashPost&&"wp_template"===r&&(n.trashPost=function(){}),n}}}),Object(x.use)(function(t){return{dispatch:function(e){var n=L()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;if("core/editor"===e&&n.editPost&&"wp_template"===r){var o=n.editPost;n.editPost=function(t){"draft"!==t.status&&o(t)}}return n}}});var ct=Object(x.subscribe)(function(){var t=Object(x.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&t("featured-image"),"wp_template"===fullSiteEditing.editorPostType&&t("post-status"),ct()})}]));
     12!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&t.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&t.push(a)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(){t.exports=this.wp.hooks}()},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){!function(){t.exports=this.wp.domReady}()},function(t,e){!function(){t.exports=this.wp.keycodes}()},function(t,e,n){var r=n(33),o=n(34),i=n(35);t.exports=function(t,e){return r(t)||o(t,e)||i()}},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e,n){},function(t,e){!function(){t.exports=this.wp.serverSideRender}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(29),o=n(30);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(31);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e){!function(){t.exports=this.wp.url}()},function(t,e,n){var r=n(38),o=n(39),i=n(40);t.exports=function(t){return r(t)||o(t)||i()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e,n){},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(4),i=n(1),c=n(19),a=n.n(c),l=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.a,{block:"a8c/navigation-menu"}))},s=(n(28),Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(o.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus."),icon:s,category:"layout",supports:{align:["wide","full"],html:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:l,save:function(){return null}});var u=n(12),p=n.n(u),d=n(3),f=n(9),b=n(10),m=n.n(b),O=n(20),g=n.n(O),v=n(21),y=n.n(v),h=n(22),j=n.n(h),E=n(23),_=n.n(E),w=n(24),S=n.n(w),k=n(8),P=n.n(k),x=n(2),T=n(5),I=function(t){function e(){return g()(this,e),j()(this,_()(e).apply(this,arguments))}return S()(e,t),y()(e,[{key:"toggleEditing",value:function(){var t=this.props,e=t.isEditing;(0,t.setState)({isEditing:!e})}},{key:"onSelectPost",value:function(t){var e=t.id,n=t.type;this.props.setState({isEditing:!1,selectedPostId:e,selectedPostType:n})}},{key:"render",value:function(){var t=this.props.attributes.align;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:P()("post-content-block",m()({},"align".concat(t),t))},Object(r.createElement)(T.PostTitle,null),Object(r.createElement)(T.InnerBlocks,{templateLock:!1})))}}]),e}(r.Component),B=Object(d.compose)([Object(d.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(x.withSelect)(function(t,e){var n=e.selectedPostId,r=e.selectedPostType;return{selectedPost:(0,t("core").getEntityRecord)("postType",r,n)}})])(I);n(32);Object(o.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content"),description:Object(i.__)("The page content."),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:B,save:function(){return Object(r.createElement)(T.InnerBlocks.Content,null)}});var C=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/post-content"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"post-content__block"}))}},"addContentSlotClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",C,9);var D=n(14),N=n(6),L=n.n(N),A=n(15),F=n.n(A),M=n(16),R=n.n(M),U=n(17);function H(t){var e=Object(r.useRef)();return Object(r.useEffect)(function(){e.current=t},[t]),e.current}function q(t,e,n,o,c,a){var l=Object(r.useState)({option:e,previousOption:"",loaded:!1,error:!1}),s=F()(l,2),u=s[0],p=s[1],d=H(o),f=H(c);function b(){p(L()({},u,{option:u.previousOption,isSaving:!1}))}return Object(r.useEffect)(function(){u.loaded||u.error?function(){var e=u.option,r=u.previousOption,a=e&&e.trim()===r.trim(),l=!e||0===e.trim().length;!o&&d&&l&&b();if(!c||a)return;!f&&c&&function(e){p(L()({},u,{isSaving:!0})),R()({path:"/wp/v2/settings",method:"POST",data:m()({},t,e)}).then(function(){return function(t){p(L()({},u,{previousOption:t,isDirty:!1,isSaving:!1}))}(e)}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s"),t)),b()})}(e)}():R()({path:"/wp/v2/settings"}).then(function(e){return p(L()({},u,{option:Object(U.decodeEntities)(e[t]),previousOption:Object(U.decodeEntities)(e[t]),loaded:!0,error:!1}))}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s"),t)),p(L()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s"),t),error:!0}))})}),{siteOptions:u,handleChange:function(t){a({updated:Date.now()}),p(L()({},u,{option:t}))}}}var z=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,a=r.isCurrentPostPublished,l=t("core/block-editor"),s=l.getBlockIndex,u=l.getBlockRootClientId,p=l.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&a()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,a=t.setAttributes,l=t.isLocked,s=t.insertDefaultBlock,u=q("description",Object(i.__)("Site description loading…"),n,c,o,a),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-description",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),l||s())},placeholder:Object(i.__)("Add a Site Description"),"aria-label":Object(i.__)("Site Description")}))});n(36);Object(o.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description"),description:Object(i.__)("Site description, also known as the tagline."),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:z,save:function(){return null}});var V=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,a=r.isCurrentPostPublished,l=t("core/block-editor"),s=l.getBlockIndex,u=l.getBlockRootClientId,p=l.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&a()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,a=t.setAttributes,l=t.isLocked,s=t.insertDefaultBlock,u=q("title",Object(i.__)("Site title loading…"),n,c,o,a),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-title",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),l||s())},placeholder:Object(i.__)("Add a Site Title"),"aria-label":Object(i.__)("Site Title")}))});n(37);Object(o.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title"),description:Object(i.__)("Your site title."),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:V,save:function(){return null}});var G=n(7),W=n(11),K=n(25),Q=(n(18),Object(d.compose)(Object(d.withState)({templateClientId:null}),Object(x.withSelect)(function(t,e){var n=e.attributes,r=e.templateClientId,o=t("core").getEntityRecord,i=t("core/editor"),c=i.getCurrentPostId,a=i.isEditedPostDirty,l=t("core/block-editor"),s=l.getBlock,u=l.getSelectedBlock,p=t("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=c(),b=d&&o("postType","wp_template_part",d),m=Object(K.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),O=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(r),templateTitle:Object(G.get)(b,["title","rendered"],""),isDirty:a(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:O&&"a8c/template"===O.name}}),Object(x.withDispatch)(function(t,e){var n=t("core/block-editor").receiveBlocks,r=t("core/edit-post").openGeneralSidebar,i=e.template,c=e.templateClientId,a=e.setState;return{savePost:t("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!c){var t=Object(o.parse)(Object(G.get)(i,["content","raw"],"")),e=Object(o.createBlock)("core/group",{},t);n([e]),a({templateClientId:e.clientId})}},openGeneralSidebar:r}}))(function(t){var e,n=t.attributes,o=t.editTemplateUrl,c=t.receiveTemplateBlocks,a=t.template,l=t.templateBlock,s=t.templateTitle,u=t.isDirty,p=t.savePost,d=t.isEditorSidebarOpened,f=t.openGeneralSidebar,b=t.isAnyTemplateBlockSelected;if(!a)return Object(r.createElement)(W.Placeholder,null,Object(r.createElement)(W.Spinner,null));var O=Object(r.createRef)(),g=Object(r.useState)(!1),v=F()(g,2),y=v[0],h=v[1];Object(r.useEffect)(function(){y&&!u&&O.current.click(),c()}),Object(r.useEffect)(function(){var t=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(d&&t){if(b)return f("edit-post/document"),void t.classList.add("hidden");t.classList.remove("hidden")}},[b,d,f]);var j=n.align,E=n.className;return Object(r.createElement)("div",{className:P()("template-block",(e={},m()(e,"align".concat(j),j),m()(e,"is-navigating-to-template",y),e))},l&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(W.Disabled,null,Object(r.createElement)("div",{className:E},Object(r.createElement)(T.BlockEdit,{attributes:l.attributes,block:l,clientId:l.clientId,isSelected:!1,name:l.name,setAttributes:G.noop}))),Object(r.createElement)(W.Placeholder,{className:"template-block__overlay"},y&&Object(r.createElement)("div",{className:"template-block__loading"},Object(r.createElement)(W.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading %s Editor"),s)),Object(r.createElement)(W.Button,{className:y?"hidden":null,href:o,onClick:function(t){h(!0),u&&(t.preventDefault(),p())},isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s"),s)))))})),Y=Object(d.createHigherOrderComponent)(function(t){return function(e){return"fse-site-logo"!==e.attributes.className?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__site-logo"}))}},"addFSESiteLogoClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",Y),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(o.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part"),description:Object(i.__)("Display a Template Part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Q,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var J=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/template"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__block-container"}))}},"addFSETemplateClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",J,9);var X=n(13),Z=n.n(X);Z()(function(){var t=fullSiteEditing,e=t.closeButtonLabel,n=t.closeButtonUrl,r=t.editorPostType,o=setInterval(function(){var t=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");if(t&&(clearInterval(o),"wp_template_part"===r&&n)){var i=document.createElement("a");i.href=n,i.innerHTML=e,i.className="components-button components-icon-button is-button is-default",i.setAttribute("aria-label",e),document.querySelector(".edit-post-fullscreen-mode-close__toolbar").replaceChild(i,t)}})});var $=n(26),tt=n.n($),et=n(27),nt=Object(x.withSelect)(function(t){var e=t("core").getEntityRecord,n=t("core/editor").getEditedPostAttribute;return{templateClasses:Object(G.map)(n("template_part_types"),function(t){var n=Object(G.get)(e("taxonomy","wp_template_part_type",t),"name","");return Object(G.endsWith)(n,"-header")?"site-header site-branding":Object(G.endsWith)(n,"-footer")?"site-footer":void 0})}})(function(t){var e=t.templateClasses,n=setInterval(function(){var t=document.querySelector(".block-editor-writing-flow.editor-writing-flow > div");t&&(clearInterval(n),t.className=P.a.apply(void 0,["a8c-template-editor"].concat(tt()(e))))});return null});"wp_template_part"===fullSiteEditing.editorPostType&&Object(et.registerPlugin)("fse-editor-template-classes",{render:nt}),Z()(function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(x.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site."),{isDismissible:!1})});var rt=Object(d.compose)(Object(x.withSelect)(function(t){var e=t("core/editor"),n=e.getBlocks,r=e.getEditorSettings,o=t("core/edit-post").getEditorMode,i=n().find(function(t){return"a8c/post-content"===t.name});return{rootClientId:i?i.clientId:"",showInserter:"visual"===o()&&r().richEditingEnabled}}))(function(t){var e=t.rootClientId,n=t.showInserter;return Object(r.createElement)(T.Inserter,{rootClientId:e,disabled:!n,position:"bottom right"})});Z()(function(){return function(){if("page"===fullSiteEditing.editorPostType)var t=setInterval(function(){var e=document.querySelector(".edit-post-header-toolbar");if(e){clearInterval(t);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),e.insertBefore(n,e.firstChild),Object(r.render)(Object(r.createElement)(rt,null),n)}})}()});var ot=Object(x.subscribe)(function(){if("page"!==fullSiteEditing.editorPostType)return ot();!1===Object(x.select)("core/editor").isValidTemplate()&&Object(x.dispatch)("core/editor").setTemplateValidity(!0)}),it=["logo","brand","emblem","hallmark"];Object(f.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",function(t,e){return"core/image"!==e?t:t=Object(G.assign)({},t,{keywords:t.keywords.concat(it)})});n(41);Object(x.use)(function(t){return{dispatch:function(e){var n=L()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;return"core/editor"===e&&n.trashPost&&"wp_template_part"===r&&(n.trashPost=function(){}),n}}}),Object(x.use)(function(t){return{dispatch:function(e){var n=L()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;if("core/editor"===e&&n.editPost&&"wp_template_part"===r){var o=n.editPost;n.editPost=function(t){"draft"!==t.status&&o(t)}}return n}}});var ct=Object(x.subscribe)(function(){var t=Object(x.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&t("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&t("post-status"),ct()})}]));
  • full-site-editing/trunk/full-site-editing/dist/full-site-editing.rtl.css

    r2152004 r2168427  
    1 .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-right:3px;margin-left:3px}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;right:0;margin:0;opacity:0;padding:0;position:absolute;left:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template) .fse-site-logo .components-placeholder__instructions{display:none}.edit-post-fullscreen-mode-close__toolbar a.is-button.is-default{height:auto}.edit-post-fullscreen-mode-close__toolbar a.is-button.is-default span{display:none}.edit-post-fullscreen-mode-close__toolbar a.a8c-close-button{padding:4px}.post-type-wp_template .edit-post-post-status,.post-type-wp_template .editor-post-title,.post-type-wp_template .editor-post-trash{display:none}.post-type-wp_template .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template .editor-post-switch-to-draft{display:none}.post-type-page .edit-post-layout__content,.post-type-wp_template .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template .edit-post-layout__content .edit-post-visual-editor{flex:none;margin:36px 32px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media (max-width:768px){.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template .edit-post-layout__content .edit-post-visual-editor{margin:0}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
     1.wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-right:0;margin-left:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{right:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-right:3px;margin-left:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;right:0;margin:0;opacity:0;padding:0;position:absolute;left:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
  • full-site-editing/trunk/full-site-editing/editor/remove-editor-panels/index.js

    r2152004 r2168427  
    2525    // https://github.com/WordPress/gutenberg/pull/17117
    2626    // When support is added, we should remove the CSS hack at '../style.scss'
    27     if ( 'wp_template' === fullSiteEditing.editorPostType ) {
     27    if ( 'wp_template_part' === fullSiteEditing.editorPostType ) {
    2828        removeEditorPanel( 'post-status' );
    2929    }
  • full-site-editing/trunk/full-site-editing/editor/style.scss

    r2152004 r2168427  
    1 .post-type-wp_template {
     1.post-type-wp_template_part {
    22    .editor-post-title,
    33    .editor-post-trash {
     
    2121}
    2222
    23 .post-type-page, .post-type-wp_template {
    24     .edit-post-layout__content {
    25         background: #eee;
    26     }
     23.post-type-page, .post-type-wp_template_part {
     24    @media ( min-width: 768px ) {
     25        .edit-post-layout__content {
     26            background: #eee;
     27        }
    2728
    28     .edit-post-layout__content .edit-post-visual-editor {
    29         flex: none;
    30         margin: 36px 32px;
    31         box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.14 ), 0 3px 1px -2px rgba( 0, 0, 0, 0.12 ), 0 1px 5px 0 rgba( 0, 0, 0, 0.2 );
    32 
    33         @media ( max-width: 768px ) {
    34             margin: 0;
     29        .edit-post-layout__content .edit-post-visual-editor {
     30            box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.14 ), 0 3px 1px -2px rgba( 0, 0, 0, 0.12 ), 0 1px 5px 0 rgba( 0, 0, 0, 0.2 );
     31            flex: none;
     32            margin: 36px 32px;
    3533        }
    3634    }
  • full-site-editing/trunk/full-site-editing/editor/suppress-draft-action/index.js

    r2152004 r2168427  
    1313            const { editorPostType } = fullSiteEditing;
    1414
    15             if ( namespace === 'core/editor' && actions.editPost && editorPostType === 'wp_template' ) {
     15            if (
     16                namespace === 'core/editor' &&
     17                actions.editPost &&
     18                editorPostType === 'wp_template_part'
     19            ) {
    1620                const originalEditPost = actions.editPost;
    1721
  • full-site-editing/trunk/full-site-editing/editor/suppress-trash-action/index.js

    r2152004 r2168427  
    1313            const { editorPostType } = fullSiteEditing;
    1414
    15             if ( namespace === 'core/editor' && actions.trashPost && editorPostType === 'wp_template' ) {
     15            if (
     16                namespace === 'core/editor' &&
     17                actions.trashPost &&
     18                editorPostType === 'wp_template_part'
     19            ) {
    1620                actions.trashPost = () => {};
    1721            }
  • full-site-editing/trunk/full-site-editing/plugins/close-button-override/index.js

    r2140780 r2168427  
    55 */
    66import domReady from '@wordpress/dom-ready';
    7 
    8 /**
    9  * Internal dependencies
    10  */
    11 import './style.scss';
    127
    138domReady( () => {
     
    2318
    2419        // When closing Template CPT (e.g. header) to navigate back to parent page.
    25         if ( 'wp_template' === editorPostType && closeButtonUrl ) {
     20        if ( 'wp_template_part' === editorPostType && closeButtonUrl ) {
    2621            const newCloseButton = document.createElement( 'a' );
    2722            newCloseButton.href = closeButtonUrl;
     
    3227            const parentContainer = document.querySelector( '.edit-post-fullscreen-mode-close__toolbar' );
    3328            parentContainer.replaceChild( newCloseButton, closeButton );
    34         } else {
    35             // Otherwise just replace the left caret with an X icon.
    36             // The size is 28 instead of 20 because `dashicons-no-alt` looks smaller than `dashicons-arrow-left-alt2`.
    37             closeButton.innerHTML =
    38                 '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" viewBox="0 0 20 20"><path d="M14.95 6.46l-3.54 3.54 3.54 3.54-1.41 1.41-3.54-3.53-3.53 3.53-1.42-1.42 3.53-3.53-3.53-3.53 1.42-1.42 3.53 3.53 3.54-3.53z"></path></svg>';
    39             closeButton.classList.add( 'a8c-close-button' );
    4029        }
    4130    } );
  • full-site-editing/trunk/full-site-editing/plugins/editor-template-classes/index.js

    r2152004 r2168427  
    1515    const { getEntityRecord } = select( 'core' );
    1616    const { getEditedPostAttribute } = select( 'core/editor' );
    17     const templateClasses = map( getEditedPostAttribute( 'template_types' ), typeId => {
    18         const typeName = get( getEntityRecord( 'taxonomy', 'wp_template_type', typeId ), 'name', '' );
     17    const templateClasses = map( getEditedPostAttribute( 'template_part_types' ), typeId => {
     18        const typeName = get(
     19            getEntityRecord( 'taxonomy', 'wp_template_part_type', typeId ),
     20            'name',
     21            ''
     22        );
    1923        if ( endsWith( typeName, '-header' ) ) {
    2024            return 'site-header site-branding';
     
    4246} );
    4347
    44 if ( 'wp_template' === fullSiteEditing.editorPostType ) {
     48if ( 'wp_template_part' === fullSiteEditing.editorPostType ) {
    4549    registerPlugin( 'fse-editor-template-classes', {
    4650        render: EditorTemplateClasses,
  • full-site-editing/trunk/full-site-editing/plugins/template-update-notice/index.js

    r2140780 r2168427  
    88
    99domReady( () => {
    10     if ( 'wp_template' !== fullSiteEditing.editorPostType ) {
     10    if ( 'wp_template_part' !== fullSiteEditing.editorPostType ) {
    1111        return;
    1212    }
  • full-site-editing/trunk/full-site-editing/templates/class-wp-template-inserter.php

    r2140780 r2168427  
    8383
    8484        if ( ! $response ) {
     85            do_action(
     86                'a8c_fse_log',
     87                'template_population_failure',
     88                [
     89                    'context'    => 'WP_Template_Inserter->fetch_template_parts',
     90                    'error'      => 'Fetch retry timeout',
     91                    'theme_slug' => $this->theme_slug,
     92                ]
     93            );
     94            $this->header_content = $this->get_default_header();
     95            $this->footer_content = $this->get_default_footer();
    8596            return;
    8697        }
     
    126137
    127138    /**
     139     * Returns a default header if call to template api fails for some reason.
     140     *
     141     * @return string Content of a default header
     142     */
     143    public function get_default_header() {
     144        return '<!-- wp:a8c/site-description /-->
     145            <!-- wp:a8c/site-title /-->
     146            <!-- wp:a8c/navigation-menu /-->';
     147    }
     148
     149    /**
     150     * Returns a default footer if call to template api fails for some reason.
     151     *
     152     * @return string Content of a default footer
     153     */
     154    public function get_default_footer() {
     155        return '<!-- wp:a8c/navigation-menu /-->';
     156    }
     157
     158    /**
    128159     * Determines whether FSE data has already been inserted.
    129160     *
     
    138169     */
    139170    public function insert_default_template_data() {
     171        do_action(
     172            'a8c_fse_log',
     173            'before_template_population',
     174            [
     175                'context'    => 'WP_Template_Inserter->insert_default_template_data',
     176                'theme_slug' => $this->theme_slug,
     177            ]
     178        );
     179
    140180        if ( $this->is_template_data_inserted() ) {
    141181            /*
     
    143183             * Multiple themes will still be able to insert different templates.
    144184             */
     185            do_action(
     186                'a8c_fse_log',
     187                'template_population_failure',
     188                [
     189                    'context'    => 'WP_Template_Inserter->insert_default_template_data',
     190                    'error'      => 'Data already exist',
     191                    'theme_slug' => $this->theme_slug,
     192                ]
     193            );
    145194            return;
    146195        }
     
    161210                'post_content'   => $this->header_content,
    162211                'post_status'    => 'publish',
    163                 'post_type'      => 'wp_template',
     212                'post_type'      => 'wp_template_part',
    164213                'comment_status' => 'closed',
    165214                'ping_status'    => 'closed',
     
    167216        );
    168217
    169         if ( ! term_exists( "$this->theme_slug-header", 'wp_template_type' ) ) {
    170             wp_insert_term( "$this->theme_slug-header", 'wp_template_type' );
    171         }
    172 
    173         wp_set_object_terms( $header_id, "$this->theme_slug-header", 'wp_template_type' );
     218        if ( ! term_exists( "$this->theme_slug-header", 'wp_template_part_type' ) ) {
     219            wp_insert_term( "$this->theme_slug-header", 'wp_template_part_type' );
     220        }
     221
     222        wp_set_object_terms( $header_id, "$this->theme_slug-header", 'wp_template_part_type' );
    174223
    175224        $footer_id = wp_insert_post(
     
    178227                'post_content'   => $this->footer_content,
    179228                'post_status'    => 'publish',
    180                 'post_type'      => 'wp_template',
     229                'post_type'      => 'wp_template_part',
    181230                'comment_status' => 'closed',
    182231                'ping_status'    => 'closed',
     
    184233        );
    185234
    186         if ( ! term_exists( "$this->theme_slug-footer", 'wp_template_type' ) ) {
    187             wp_insert_term( "$this->theme_slug-footer", 'wp_template_type' );
    188         }
    189 
    190         wp_set_object_terms( $footer_id, "$this->theme_slug-footer", 'wp_template_type' );
     235        if ( ! term_exists( "$this->theme_slug-footer", 'wp_template_part_type' ) ) {
     236            wp_insert_term( "$this->theme_slug-footer", 'wp_template_part_type' );
     237        }
     238
     239        wp_set_object_terms( $footer_id, "$this->theme_slug-footer", 'wp_template_part_type' );
    191240
    192241        add_option( $this->fse_template_data_option, true );
     242
     243        do_action(
     244            'a8c_fse_log',
     245            'template_population_success',
     246            [
     247                'context'    => 'WP_Template_Inserter->insert_default_template_data',
     248                'theme_slug' => $this->theme_slug,
     249            ]
     250        );
    193251    }
    194252
     
    209267     */
    210268    public function insert_default_pages() {
     269        do_action(
     270            'a8c_fse_log',
     271            'before_pages_population',
     272            [
     273                'context'    => 'WP_Template_Inserter->insert_default_pages',
     274                'theme_slug' => $this->theme_slug,
     275            ]
     276        );
     277
    211278        // Bail if this data has already been inserted.
    212279        if ( $this->is_pages_data_inserted() ) {
     280            do_action(
     281                'a8c_fse_log',
     282                'pages_population_failure',
     283                [
     284                    'context'    => 'WP_Template_Inserter->insert_default_pages',
     285                    'error'      => 'Data already exist',
     286                    'theme_slug' => $this->theme_slug,
     287                ]
     288            );
    213289            return;
    214290        }
     
    224300
    225301        if ( ! $response ) {
     302            do_action(
     303                'a8c_fse_log',
     304                'pages_population_failure',
     305                [
     306                    'context'    => 'WP_Template_Inserter->insert_default_pages',
     307                    'error'      => 'Fetch retry timeout',
     308                    'theme_slug' => $this->theme_slug,
     309                ]
     310            );
    226311            return;
    227312        }
     
    229314        $api_response = json_decode( wp_remote_retrieve_body( $response ), true );
    230315
    231         $about_page_content   = '';
    232         $contact_page_content = '';
    233 
    234         /*
    235          * Array of returned templates is not keyed by name, so we have to access it directly like this.
    236          * About page is at position 6 in the array, and Contact page at 1.
    237          */
    238         if ( ! empty( $api_response['templates'][6]['content'] ) ) {
    239             $about_page_content = $api_response['templates'][6]['content'];
    240         }
    241 
    242         if ( ! empty( $api_response['templates'][1]['content'] ) ) {
    243             $contact_page_content = $api_response['templates'][1]['content'];
    244         }
    245 
    246         if ( empty( get_page_by_title( 'About' ) ) ) {
     316        // Convert templates response to [ slug => content ] pairs to extract required content more easily.
     317        $template_content_by_slug = wp_list_pluck( $api_response['templates'], 'content', 'slug' );
     318
     319        if ( empty( get_page_by_title( 'About' ) ) && ! empty( $template_content_by_slug['about'] ) ) {
    247320            wp_insert_post(
    248321                [
    249322                    'post_title'   => _x( 'About', 'Default page title', 'full-site-editing' ),
    250                     'post_content' => $about_page_content,
     323                    'post_content' => $template_content_by_slug['about'],
    251324                    'post_status'  => 'publish',
    252325                    'post_type'    => 'page',
     
    255328        }
    256329
    257         if ( empty( get_page_by_title( 'Contact' ) ) ) {
     330        if ( empty( get_page_by_title( 'Contact' ) ) && ! empty( $template_content_by_slug['contact'] ) ) {
    258331            wp_insert_post(
    259332                [
    260333                    'post_title'   => _x( 'Contact', 'Default page title', 'full-site-editing' ),
    261                     'post_content' => $contact_page_content,
     334                    'post_content' => $template_content_by_slug['contact'],
    262335                    'post_status'  => 'publish',
    263336                    'post_type'    => 'page',
     
    267340
    268341        update_option( $this->fse_page_data_option, true );
     342
     343        do_action(
     344            'a8c_fse_log',
     345            'pages_population_success',
     346            [
     347                'context'    => 'WP_Template_Inserter->insert_default_pages',
     348                'theme_slug' => $this->theme_slug,
     349            ]
     350        );
    269351    }
    270352
     
    291373    public function register_template_post_types() {
    292374        register_post_type(
    293             'wp_template',
     375            'wp_template_part',
    294376            array(
    295377                'labels'                => array(
    296                     'name'                     => _x( 'Templates', 'post type general name', 'full-site-editing' ),
    297                     'singular_name'            => _x( 'Template', 'post type singular name', 'full-site-editing' ),
    298                     'menu_name'                => _x( 'Templates', 'admin menu', 'full-site-editing' ),
    299                     'name_admin_bar'           => _x( 'Template', 'add new on admin bar', 'full-site-editing' ),
     378                    'name'                     => _x( 'Template Parts', 'post type general name', 'full-site-editing' ),
     379                    'singular_name'            => _x( 'Template Part', 'post type singular name', 'full-site-editing' ),
     380                    'menu_name'                => _x( 'Template Parts', 'admin menu', 'full-site-editing' ),
     381                    'name_admin_bar'           => _x( 'Template Part', 'add new on admin bar', 'full-site-editing' ),
    300382                    'add_new'                  => _x( 'Add New', 'Template', 'full-site-editing' ),
    301                     'add_new_item'             => __( 'Add New Template', 'full-site-editing' ),
    302                     'new_item'                 => __( 'New Template', 'full-site-editing' ),
    303                     'edit_item'                => __( 'Edit Template', 'full-site-editing' ),
    304                     'view_item'                => __( 'View Template', 'full-site-editing' ),
    305                     'all_items'                => __( 'All Templates', 'full-site-editing' ),
    306                     'search_items'             => __( 'Search Templates', 'full-site-editing' ),
    307                     'not_found'                => __( 'No templates found.', 'full-site-editing' ),
    308                     'not_found_in_trash'       => __( 'No templates found in Trash.', 'full-site-editing' ),
    309                     'filter_items_list'        => __( 'Filter templates list', 'full-site-editing' ),
    310                     'items_list_navigation'    => __( 'Templates list navigation', 'full-site-editing' ),
    311                     'items_list'               => __( 'Templates list', 'full-site-editing' ),
    312                     'item_published'           => __( 'Template published.', 'full-site-editing' ),
    313                     'item_published_privately' => __( 'Template published privately.', 'full-site-editing' ),
    314                     'item_reverted_to_draft'   => __( 'Template reverted to draft.', 'full-site-editing' ),
    315                     'item_scheduled'           => __( 'Template scheduled.', 'full-site-editing' ),
    316                     'item_updated'             => __( 'Template updated.', 'full-site-editing' ),
     383                    'add_new_item'             => __( 'Add New Template Part', 'full-site-editing' ),
     384                    'new_item'                 => __( 'New Template Part', 'full-site-editing' ),
     385                    'edit_item'                => __( 'Edit Template Part', 'full-site-editing' ),
     386                    'view_item'                => __( 'View Template Part', 'full-site-editing' ),
     387                    'all_items'                => __( 'All Template Parts', 'full-site-editing' ),
     388                    'search_items'             => __( 'Search Template Parts', 'full-site-editing' ),
     389                    'not_found'                => __( 'No template parts found.', 'full-site-editing' ),
     390                    'not_found_in_trash'       => __( 'No template parts found in Trash.', 'full-site-editing' ),
     391                    'filter_items_list'        => __( 'Filter template parts list', 'full-site-editing' ),
     392                    'items_list_navigation'    => __( 'Template parts list navigation', 'full-site-editing' ),
     393                    'items_list'               => __( 'Template parts list', 'full-site-editing' ),
     394                    'item_published'           => __( 'Template part published.', 'full-site-editing' ),
     395                    'item_published_privately' => __( 'Template part published privately.', 'full-site-editing' ),
     396                    'item_reverted_to_draft'   => __( 'Template part reverted to draft.', 'full-site-editing' ),
     397                    'item_scheduled'           => __( 'Template part scheduled.', 'full-site-editing' ),
     398                    'item_updated'             => __( 'Template part updated.', 'full-site-editing' ),
    317399                ),
    318400                'menu_icon'             => 'dashicons-layout',
     
    322404                'rewrite'               => false,
    323405                'show_in_rest'          => true, // Otherwise previews won't be generated in full page view.
    324                 'rest_base'             => 'templates',
     406                'rest_base'             => 'template_parts',
    325407                'rest_controller_class' => __NAMESPACE__ . '\REST_Templates_Controller',
    326                 'capability_type'       => 'template',
     408                'capability_type'       => 'template_part',
    327409                'capabilities'          => array(
    328410                    // You need to be able to edit posts, in order to read templates in their raw form.
     
    348430
    349431        register_taxonomy(
    350             'wp_template_type',
    351             'wp_template',
     432            'wp_template_part_type',
     433            'wp_template_part',
    352434            array(
    353435                'labels'             => array(
    354                     'name'              => _x( 'Template Types', 'taxonomy general name', 'full-site-editing' ),
    355                     'singular_name'     => _x( 'Template Type', 'taxonomy singular name', 'full-site-editing' ),
    356                     'menu_name'         => _x( 'Template Types', 'admin menu', 'full-site-editing' ),
    357                     'all_items'         => __( 'All Template Types', 'full-site-editing' ),
    358                     'edit_item'         => __( 'Edit Template Type', 'full-site-editing' ),
    359                     'view_item'         => __( 'View Template Type', 'full-site-editing' ),
    360                     'update_item'       => __( 'Update Template Type', 'full-site-editing' ),
    361                     'add_new_item'      => __( 'Add New Template Type', 'full-site-editing' ),
    362                     'new_item_name'     => __( 'New Template Type', 'full-site-editing' ),
    363                     'parent_item'       => __( 'Parent Template Type', 'full-site-editing' ),
    364                     'parent_item_colon' => __( 'Parent Template Type:', 'full-site-editing' ),
    365                     'search_items'      => __( 'Search Template Types', 'full-site-editing' ),
    366                     'not_found'         => __( 'No template types found.', 'full-site-editing' ),
    367                     'back_to_items'     => __( 'Back to template types', 'full-site-editing' ),
     436                    'name'              => _x( 'Template Part Types', 'taxonomy general name', 'full-site-editing' ),
     437                    'singular_name'     => _x( 'Template Part Type', 'taxonomy singular name', 'full-site-editing' ),
     438                    'menu_name'         => _x( 'Template Part Types', 'admin menu', 'full-site-editing' ),
     439                    'all_items'         => __( 'All Template Part Types', 'full-site-editing' ),
     440                    'edit_item'         => __( 'Edit Template Part Type', 'full-site-editing' ),
     441                    'view_item'         => __( 'View Template Part Type', 'full-site-editing' ),
     442                    'update_item'       => __( 'Update Template Part Type', 'full-site-editing' ),
     443                    'add_new_item'      => __( 'Add New Template Part Type', 'full-site-editing' ),
     444                    'new_item_name'     => __( 'New Template Part Type', 'full-site-editing' ),
     445                    'parent_item'       => __( 'Parent Template Part Type', 'full-site-editing' ),
     446                    'parent_item_colon' => __( 'Parent Template Part Type:', 'full-site-editing' ),
     447                    'search_items'      => __( 'Search Template Part Types', 'full-site-editing' ),
     448                    'not_found'         => __( 'No template part types found.', 'full-site-editing' ),
     449                    'back_to_items'     => __( 'Back to template part types', 'full-site-editing' ),
    368450                ),
    369451                'public'             => false,
     
    373455                'show_in_nav_menu'   => false,
    374456                'show_in_rest'       => true,
    375                 'rest_base'          => 'template_types',
     457                'rest_base'          => 'template_part_types',
    376458                'show_tagcloud'      => false,
    377459                'hierarchical'       => true,
  • full-site-editing/trunk/full-site-editing/templates/class-wp-template.php

    r2152004 r2168427  
    9494        }
    9595
    96         $term = get_term_by( 'name', "$this->current_theme_name-$template_type", 'wp_template_type', ARRAY_A );
     96        $term = get_term_by( 'name', "$this->current_theme_name-$template_type", 'wp_template_part_type', ARRAY_A );
    9797
    9898        // Bail if current site doesn't have this term registered.
     
    204204        // 10 priority
    205205        $content = wptexturize( $content );
    206         // @todo maybe look at WPCOM_Responsive_Images for WPCom responsive image handling
    207206
    208207        // 11 priority
    209208        $content = do_shortcode( $content );
    210209
     210        $content = prepend_attachment( $content );
     211
     212        if ( has_filter( 'a8c_fse_make_content_images_responsive' ) ) {
     213            $content = apply_filters( 'a8c_fse_make_content_images_responsive', $content );
     214        } else {
     215            $content = wp_make_content_images_responsive( $content );
     216        }
     217
    211218        // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
    212219        echo $content;
  • full-site-editing/trunk/readme.txt

    r2164033 r2168427  
    44Requires at least: 5.0
    55Tested up to: 5.2
    6 Stable tag: 0.7.1
     6Stable tag: 0.9
    77Requires PHP: 5.6.20
    88License: GPLv2 or later
     
    4141== Changelog ==
    4242
    43 = 0.7.1 =
    44 * Passes stylesheet to templates API to get homepage templates for latest themes.
     43= 0.9 =
     44
     45* Rename wp_template CPT to wp_template_part.
    4546
    4647= 0.7 =
Note: See TracChangeset for help on using the changeset viewer.