Plugin Directory

Changeset 2237995


Ignore:
Timestamp:
02/03/2020 10:31:21 PM (6 years ago)
Author:
narrative
Message:

add v1.0.4

Location:
narrative-so/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • narrative-so/trunk/assets/blocks.js

    r2061865 r2237995  
    88 */
    99
    10 
    1110(function (blocks, editor, i18n, element, components, _) {
    12 
    1311
    1412    var InspectorControls = wp.editor.InspectorControls;
     
    1715    var Fragment = wp.element.Fragment;
    1816    var __ = i18n.__;
     17    var $ = jQuery;
    1918
    2019    var iconEl = el('svg', { width: 18, height: 18 },
    21         el('path', { fill: "#9D9D9D", d: "M15,18 L8,18 L5,18 L5,5 L8,5 L8,15 L15,15 L15,0 L18,0 L18,18 L15,18 Z M10,3 L3,3 L3,18 L0,18 L0,0 L3,0 L13,0 L13,3 L13,13 L10,13 L10,3 Z\" id=\"narrative-colour-25x25" } )
     20        el('path', { fill: "#9D9D9D", d: "m15,18l-7,0l-3,0l0,-13l3,0l0,10l7,0l0,-15l3,0l0,18l-3,0zm-5,-15l-7,0l0,15l-3,0l0,-18l3,0l10,0l0,3l0,10l-3,0l0,-13",'id':'narrative-colour-25x25' } )
    2221    );
    2322
     
    4039    blocks.registerBlockType('narrative/block', {
    4140        title: __('Narrative', 'narrative-publisher'),
    42         //icon: 'welcome-widgets-menus',
    4341        icon: iconEl,
    4442        attributes: {
     
    5250        supports: {
    5351            className: false,
    54             customClassName: false,
    55             inserter: false,
     52            customClassName: true,
     53            inserter: true,
    5654        },
    5755        edit: function (props) {
    5856
    59             var attributes = props.attributes;
     57            let attributes = props.attributes;
    6058
     59            if ( ! attributes.narrative_script ){
     60                return el(
     61                    'b',
     62                    null,
     63                    __('It\'s not a narrative post', 'narrative-publisher')
     64                );
     65            }
    6166            try {
    6267
     
    6570            } catch (err) {
    6671
    67                 console.log('Narrative error: ' + e.name + ":" + e.message + "\n" + e.stack);
     72                console.error('Narrative error: ' + err.name + ":" + err.message + "\n" + err.stack);
    6873
    6974            }
     
    103108                )
    104109            );
    105 
    106110            return output;
    107111
  • narrative-so/trunk/includes/class-api.php

    r2061865 r2237995  
    2222    public function __construct() {
    2323
    24         add_action( 'parse_query', array( $this, 'init_narrative_rewrite' ), 10, 0 );
     24        add_action( 'init', array( $this, 'init_narrative_rewrite' ), 10, 0 );
    2525        add_filter( 'query_vars', array( $this, 'add_query_vars' ), 10, 1 );
    2626
     
    3232    public function init_narrative_rewrite() {
    3333
    34         global $wp_rewrite;
    3534        add_rewrite_rule( '^narrative/?$', 'index.php?narrative=/', 'top' );
    3635        add_rewrite_rule( '^narrative/info/?$', 'index.php?narrative=info', 'top' );
     
    3837        add_rewrite_rule( '^narrative/post/([0-9]{1,})/?$', 'index.php?narrative=post&post_id=$matches[1]', 'top' );
    3938
     39        global $wp_rewrite;
    4040        $wp_rewrite->flush_rules( true );
     41        flush_rewrite_rules();
    4142
    4243    }
  • narrative-so/trunk/includes/class-handlers.php

    r2061865 r2237995  
    160160     */
    161161    private function set_post( $json_params, $post_id = '' ) {
    162 
    163         $decoded_params = '';
    164162
    165163        if ( empty( $json_params ) ) {
  • narrative-so/trunk/narrative-publisher.php

    r2152002 r2237995  
    44Plugin URI:
    55Description:  This plugin connects your website with your Narrative account allowing you to publish your Narrative posts directly to your website. Please contact [email protected] for any help.
    6 Version: 1.0.3
     6Version: 1.0.4
    77Author: Narrative
    88Author URI: https://narrative.so/
     
    1919include_once ABSPATH . 'wp-admin/includes/plugin.php';
    2020include_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin.php';
     21
  • narrative-so/trunk/readme.txt

    r2152002 r2237995  
    55Tested up to: 5.2
    66Requires PHP: 5.3
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.