Plugin Directory

Changeset 2712628


Ignore:
Timestamp:
04/21/2022 08:39:07 AM (4 years ago)
Author:
silsha
Message:

0.10: Fixed error when opening the page in the backend.

Location:
charts-for-tablepress-chartist/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • charts-for-tablepress-chartist/trunk/README.md

    r1649246 r2712628  
    1 #TablePress Extension: Chartist
     1# TablePress Extension: Chartist
    22
    33![Sample chart](wp-assets/screenshot-1.jpg)
    44
    5 ##About
     5## About
    66
    77Using [Chartist.js](http://gionkunz.github.io/chartist-js/), this [TablePress](https://tablepress.org/) Extension creates a responsive chart based on the data in a TablePress table.
    88
    9 ##Usage
     9## Usage
    1010
    1111Add the Shortcode `[table-chart id=123 /]` to a post or page to create a chart from the TablePress table 123.
     
    3030The other rows will be shown as lines or bars. Pie or percent charts will only use the first data row. Percent charts will ignore the header row.
    3131
    32 ##CSS customizations
     32## CSS customizations
    3333
    3434If you'd like to overide [the default style](http://gionkunz.github.io/chartist-js/getting-started.html#the-sass-way), you can add a `tablepress-chartist-custom.css` in `wp-content` directory. It will be loaded after the Extension's default CSS file `libdist/chartist.min.css`.
     
    5858```
    5959
    60 ##Installation
     60## Installation
    6161
    6262**Prerequisite:** The [TablePress](https://tablepress.org/) plugin
     
    66661. When the plugin is installed, activate it.
    6767
    68 ##Changelog
     68## Changelog
     69* 0.10 Fixed error when opening the page in the backend. (Thanks to [andrewleonard](https://wordpress.org/support/topic/problems-with-chartist-plugin/))
    6970* 0.9 Updated chartist.js to 0.11.0
    7071* 0.8 Added support for pie charts with percent labels, added animation for bar charts. Added parameters `label_offset`, `chart_padding` and `donut_width`.
     
    7879* 0.1 Initial release (i.e. an early beta).
    7980
    80 ##Credits
     81## Credits
    8182
    8283* Gion Kunz for creating [Chartist.js](http://gionkunz.github.io/chartist-js/)
    8384* Tobias Bäthge for creating [TablePress](https://tablepress.org/)
    8485
    85 ##Copyright and License
     86## Copyright and License
    8687
    8788TablePress Extension: Chartist is copyright 2014 Per Soderlind
  • charts-for-tablepress-chartist/trunk/readme.txt

    r1776351 r2712628  
    33Donate link: https://sharethemeal.org/en/index.html
    44Tags: tablepress, table, chart, responsive
    5 Requires at least: 4.7
    6 Tested up to: 4.9
    7 Stable tag: 0.9
     5Requires at least: 5.9
     6Tested up to: 5.9.3
     7Stable tag: 0.10
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8888
    8989== Changelog ==
     90= 0.10 =
     91* Fixed error when opening the page in the backend. (Thanks to [andrewleonard](https://wordpress.org/support/topic/problems-with-chartist-plugin/))
    9092= 0.9 =
    9193* Updated chartist.js to 0.11.0
  • charts-for-tablepress-chartist/trunk/tablepress_chartist.php

    r1649246 r2712628  
    44Plugin URI: https://github.com/silsha/tablepress_chartist
    55Description: Extension for TablePress to create a responsive chart based on the data in a TablePress table.
    6 Version: 0.9
     6Version: 0.10
    77Author: Silsha Fux
    88Author URI: https://silsha.me
     
    3434     * @var string
    3535     */
    36     protected static $version = '0.9';
     36    protected static $version = '0.8';
    3737
    3838    /**
     
    120120        add_filter('tablepress_shortcode_table_default_shortcode_atts', [__CLASS__, 'register_shortcode_attributes']);
    121121        add_filter('tablepress_table_output', [__CLASS__, 'generate_chart'], 10, 3);
    122         add_shortcode('table-chart', [__CLASS__, 'handle_table_chart_shortcode']);
     122        if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
     123            // TablePress doesn't support the REST API
     124        } else {
     125            add_shortcode('table-chart', [__CLASS__, 'handle_table_chart_shortcode']);
     126        }
    123127    }
    124128
     
    147151        }
    148152
    149         return tablepress_get_table($table_query);
     153        if ( function_exists( 'tablepress_get_table' )) {
     154            return tablepress_get_table($table_query);
     155        }
     156        return false;
    150157    }
    151158
Note: See TracChangeset for help on using the changeset viewer.