Changeset 1989442
- Timestamp:
- 12/08/2018 06:51:13 PM (7 years ago)
- Location:
- transform/trunk
- Files:
-
- 1 added
- 5 edited
-
css/nxf_transform.css (modified) (1 diff)
-
js/block.js (added)
-
lib/nxf_dashboard.php (modified) (3 diffs)
-
lib/nxf_transform.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
-
transform.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
transform/trunk/css/nxf_transform.css
r1923800 r1989442 15 15 .nxf-instance-select { 16 16 width: 540px; 17 } 18 19 .nxf-instance-form { 20 text-align: center; 21 font-family: sans-serif; 17 22 } 18 23 -
transform/trunk/lib/nxf_dashboard.php
r1923800 r1989442 36 36 add_action( 'admin_init', array( 'NXF_Dashboard', 'transform_deactivate_license' ) ); 37 37 add_action( 'admin_enqueue_scripts', array( 'NXF_Dashboard', 'transform_enqueue_styles' ) ); 38 add_action( 'init', array( 'NXF_Dashboard', 'transform_block' ) ); 38 39 } 39 40 … … 325 326 326 327 public static function transform_media_buttons() { 327 //wp_enqueue_script('jquery-ui-dialog');328 wp_enqueue_script('jquery-ui-dialog'); 328 329 wp_enqueue_style( 'wp-jquery-ui-dialog' ); 329 330 wp_enqueue_style( 'nxfTransformStylesheet' ); 330 331 331 print '<a href="#" id="insert-transform-media" class="button">' . __( 'Add a Transform', 'nxf-transform' ) . '</a> <div id="nxf-dialog"></div>';332 print '<a href="#" id="insert-transform-media" class="button">' . __( 'Add a Transform', 'nxf-transform' ) . '</a>'; 332 333 } 333 334 … … 627 628 exit; 628 629 } 630 631 public static function transform_block() { 632 if ( ! function_exists( 'register_block_type' ) ) { 633 // Gutenberg is not active. 634 return; 635 } 636 637 wp_register_script( 638 'nxf-transform', 639 /* plugins_url( 'js/block.js', __FILE__ ), */ 640 plugins_url( 'js/block.js', plugin_dir_path( __FILE__ ) ), 641 array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'underscore' ), 642 filemtime( plugin_dir_path( __DIR__ ) . 'js/block.js' ) 643 ); 644 645 register_block_type( 'nxf-transform/instance-insert', array( 646 'script' => 'nxf-transform', 647 'attributes' => array( 648 'instance' => array( 649 'type' => 'string' 650 ), 651 ), 652 'render_callback' => array( 'NXF_Transform', 'render_shortcode' ), 653 ) ); 654 655 error_log("NXF: finished with register block type"); 656 657 $nxf_dashboard_model = new NXF_Dashboard_Model( 'instancelist' ); 658 659 wp_add_inline_script( 660 'nxf-transform', 661 sprintf( 662 'var nxf_transform = { model: ' . json_encode( $nxf_dashboard_model ) . ' };', 663 json_encode( wp_set_script_translations( 'nxf-transform', 'nxf-transform' ) ) 664 ), 665 'before' 666 ); 667 } 629 668 } 630 669 } 631 -
transform/trunk/lib/nxf_transform.php
r1923800 r1989442 13 13 require_once( "$dir/nxf_dashboard.php" ); 14 14 15 $nxf_dashboard = new NXF_Dashboard ;15 $nxf_dashboard = new NXF_Dashboard(); 16 16 17 17 if ( !is_admin() ) { … … 39 39 return NXF_Transform_View::render( $transform ); 40 40 } 41 42 public static function render_shortcode( $atts ) { 43 if ( $atts{'instance'} == '' ) { return ''; } 44 45 $content = NXF_Transform::transform_feed( $atts ); 46 return $content; 47 } 41 48 } 42 49 } -
transform/trunk/readme.txt
r1923800 r1989442 1 1 === Transform === 2 2 Contributors: nillc 3 Tags: transform, json, xml, dust, xslt, data, transformation, integration 3 Tags: transform, json, xml, dust, xslt, data, transformation, integration, MVC, controller 4 4 Requires at least: 4.6 5 Tested up to: 4.95 Tested up to: 54.9 6 6 Stable tag: trunk 7 7 Requires PHP: 5.6 … … 10 10 Donate link: https://netinnovationsllc.com/ 11 11 12 Transform reads URL or file JSON/XML data feeds and converts those feeds to HTML using Dust or XSLT .12 Transform reads URL or file JSON/XML data feeds and converts those feeds to HTML using Dust or XSLT, acting as a controller in an MVC architecture. 13 13 14 14 == Description == 15 15 16 Transform is a WordPress plugin that reads JSON or XML* feeds and transforms the feeds to HTML using display templates written in Dust (for JSON) or XSLT (for XML). Feeds and displays can be URLs to pages on the local or a remote web server, a path to a file on the site’s web server or static text in the WordPress database. 16 Transform is a WordPress plugin that reads JSON or XML* feeds and transforms the feeds to HTML using display templates written in Dust (for JSON) or XSLT (for XML). Feeds and displays can be URLs to pages on the local or a remote web server, a path to a file on the site’s web server or static text in the WordPress database. The plugin is the controller in an MVC environment. 17 17 18 18 * Transforming XML feeds requires XSLT support in PHP (see http://php.net/manual/en/xsl.installation.php). … … 47 47 == Changelog == 48 48 49 = 1.4 = 50 * Added support for the Gutenberg editor 51 49 52 = 1.3 = 50 53 * UI improvements when Ajax work is being done 51 * Another change.54 * Minor bug fix to selecting instances 52 55 53 56 = 1.2 = … … 62 65 == Upgrade Notice == 63 66 64 = 1. 3=67 = 1.4 = 65 68 Latest version of Transform -
transform/trunk/transform.php
r1923800 r1989442 7 7 * @license GPL-2.0+ 8 8 * @link http://wordpress.org/plugins/transform 9 * @copyright 2014-201 7Net Innovations LLC - all rights reserved9 * @copyright 2014-2018 Net Innovations LLC - all rights reserved 10 10 * 11 11 * @wordpress-plugin … … 13 13 * Plugin URI: http://wordpress.org/plugins/transform 14 14 * Description: Transform data feeds to HTML using the Dust or XSLT transformation language 15 * Version: 1. 3.015 * Version: 1.4.0 16 16 * Author: Net Innovations LLC 17 17 * Author URI: keith@netinnovationsllc.com
Note: See TracChangeset
for help on using the changeset viewer.