Plugin Directory

Changeset 2300116


Ignore:
Timestamp:
05/07/2020 02:36:13 PM (6 years ago)
Author:
yoannspace
Message:

-> Create v1.0.0

Location:
display-your-zenodo-community
Files:
8 edited
8 copied

Legend:

Unmodified
Added
Removed
  • display-your-zenodo-community/tags/1.0.0/CHANGELOG.md

    r2294161 r2300116  
    66
    77## [Unreleased]
     8
     9## [1.0.0] - 2020-05-07
    810### Added
    911- First skeleton of the plugin
     12- Addition of document counter
     13
     14### Changed
     15- Fix page counter
  • display-your-zenodo-community/tags/1.0.0/README.txt

    r2294161 r2300116  
    66Tested up to: 5.4
    77Requires PHP: 5.6.35
    8 Stable tag: 0.0.1
     8Stable tag: 1.0.0
    99License: Apache License - 2.0
    1010License URI: http://www.apache.org/licenses/LICENSE-2.0
     
    3232== Changelog ==
    3333
    34 = Unreleased =
     34= 1.0.0 =
    3535* First skeleton of the plugin
     36* Addition of document counter
     37* Fix page counter
    3638
    3739== Upgrade Notice ==
  • display-your-zenodo-community/tags/1.0.0/includes/class-display-your-zenodo-community.php

    r2294132 r2300116  
    5454            $this->version = ZENODO_PLUGIN_VERSION;
    5555        } else {
    56             $this->version = '0.0.1';
     56            $this->version = '1.0.0';
    5757        }
    5858        $this->plugin_name = 'display-your-zenodo-community';
  • display-your-zenodo-community/tags/1.0.0/public/class-display-your-zenodo-community-public.php

    r2294132 r2300116  
    101101        }
    102102        $html = "<div id=\"display-your-zenodo-community\">";
     103        $result_api = $this->zp_retrieve_json( $page );
     104        $nb_pages = 1;
     105        if( isset( $result_api->aggregations->access_right->buckets[0]->doc_count ) ) {
     106            $nb_pages = ceil( $result_api->aggregations->access_right->buckets[0]->doc_count / 10 );
     107            $html .= "<hr>";
     108            $html .= "<div class=\"counter-doc\">";
     109            $html .= "<span class=\"wphal-nbtot\">";
     110            $html .= $result_api->aggregations->access_right->buckets[0]->doc_count;
     111            $html .= "</span>" . " documents";
     112            $html .= "</div>";
     113        }
    103114        $html .= "<ul>";
    104         $result_api = $this->zp_retrieve_json( $page );
    105         $nb_in_results = 1;
    106115        foreach ( $result_api->hits->hits as $hit ) {
    107116            $html .= "<li>";
     
    133142
    134143        $html .= "<ul class='zenodo-pagination'>";
    135         $nb_pages = 1;
    136         if( isset( $result_api->aggregations->access_right->buckets[0]->doc_count ) ) {
    137             $nb_pages = floor( $result_api->aggregations->access_right->buckets[0]->doc_count / 10 );
    138         }
    139144        //Taken away from HAL plugin to have the same usability!
    140145        if( $page == 1 ) {
  • display-your-zenodo-community/tags/1.0.0/zenodo-plugin.php

    r2294162 r2300116  
    1717 * Plugin URI:        https://github.com/dariah-eric/display-your-zenodo-community
    1818 * Description:       This plugin allows user to view their community data from Zenodo on WordPress
    19  * Version:           0.0.1
     19 * Version:           1.0.0
    2020 * Author:            Yoann
    2121 * Author URI:        https://www.dariah.eu
  • display-your-zenodo-community/trunk/CHANGELOG.md

    r2294130 r2300116  
    66
    77## [Unreleased]
     8
     9## [1.0.0] - 2020-05-07
    810### Added
    911- First skeleton of the plugin
     12- Addition of document counter
     13
     14### Changed
     15- Fix page counter
  • display-your-zenodo-community/trunk/README.txt

    r2294130 r2300116  
    66Tested up to: 5.4
    77Requires PHP: 5.6.35
    8 Stable tag: 0.0.1
     8Stable tag: 1.0.0
    99License: Apache License - 2.0
    1010License URI: http://www.apache.org/licenses/LICENSE-2.0
     
    3232== Changelog ==
    3333
    34 = Unreleased =
     34= 1.0.0 =
    3535* First skeleton of the plugin
     36* Addition of document counter
     37* Fix page counter
    3638
    3739== Upgrade Notice ==
  • display-your-zenodo-community/trunk/includes/class-display-your-zenodo-community.php

    r2294132 r2300116  
    5454            $this->version = ZENODO_PLUGIN_VERSION;
    5555        } else {
    56             $this->version = '0.0.1';
     56            $this->version = '1.0.0';
    5757        }
    5858        $this->plugin_name = 'display-your-zenodo-community';
  • display-your-zenodo-community/trunk/public/class-display-your-zenodo-community-public.php

    r2294132 r2300116  
    101101        }
    102102        $html = "<div id=\"display-your-zenodo-community\">";
     103        $result_api = $this->zp_retrieve_json( $page );
     104        $nb_pages = 1;
     105        if( isset( $result_api->aggregations->access_right->buckets[0]->doc_count ) ) {
     106            $nb_pages = ceil( $result_api->aggregations->access_right->buckets[0]->doc_count / 10 );
     107            $html .= "<hr>";
     108            $html .= "<div class=\"counter-doc\">";
     109            $html .= "<span class=\"wphal-nbtot\">";
     110            $html .= $result_api->aggregations->access_right->buckets[0]->doc_count;
     111            $html .= "</span>" . " documents";
     112            $html .= "</div>";
     113        }
    103114        $html .= "<ul>";
    104         $result_api = $this->zp_retrieve_json( $page );
    105         $nb_in_results = 1;
    106115        foreach ( $result_api->hits->hits as $hit ) {
    107116            $html .= "<li>";
     
    133142
    134143        $html .= "<ul class='zenodo-pagination'>";
    135         $nb_pages = 1;
    136         if( isset( $result_api->aggregations->access_right->buckets[0]->doc_count ) ) {
    137             $nb_pages = floor( $result_api->aggregations->access_right->buckets[0]->doc_count / 10 );
    138         }
    139144        //Taken away from HAL plugin to have the same usability!
    140145        if( $page == 1 ) {
  • display-your-zenodo-community/trunk/zenodo-plugin.php

    r2294162 r2300116  
    1717 * Plugin URI:        https://github.com/dariah-eric/display-your-zenodo-community
    1818 * Description:       This plugin allows user to view their community data from Zenodo on WordPress
    19  * Version:           0.0.1
     19 * Version:           1.0.0
    2020 * Author:            Yoann
    2121 * Author URI:        https://www.dariah.eu
Note: See TracChangeset for help on using the changeset viewer.