Plugin Directory

Changeset 2901151


Ignore:
Timestamp:
04/19/2023 11:13:24 AM (3 years ago)
Author:
kusimo
Message:

tagging version 1.2.5

Location:
quick-download-button
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • quick-download-button/tags/1.2.5/class/create.downloadpage.class.php

    r2767237 r2901151  
    2020
    2121        global $wpdb;
     22
    2223        $this->title = 'Quick Download Button';
    2324
    24         if ( null == get_page_by_title( $this->title, 'OBJECT', 'post' ) & $this->post_check_duplicates( $this->title ) !== 1 ) {
     25        if ( null == $this->get_page_by_title() ) {
    2526
    2627            $this->current_user = wp_get_current_user();
     
    5051        }
    5152
     53    }
     54
     55    /**
     56     * Used to check that the page exist before creating another page
     57     * after the plugin is activated.
     58     */
     59    public function get_page_by_title() {
     60        $page_got_by_title = null;
     61        $query = new WP_Query(
     62            array(
     63                'post_type'              => 'page',
     64                'title'                  => $this->title,
     65                'post_status'            => 'publish',
     66                'posts_per_page'         => 1,
     67                'no_found_rows'          => true,
     68                'ignore_sticky_posts'    => true,
     69                'update_post_term_cache' => false,
     70                'update_post_meta_cache' => false,
     71                'orderby'                => 'post_date ID',
     72                'order'                  => 'ASC',
     73            )
     74        );
     75         
     76        if ( ! empty( $query->post ) ) {
     77            $page_got_by_title = $query->post;
     78        }
     79
     80        return $page_got_by_title;
    5281    }
    5382
  • quick-download-button/tags/1.2.5/quick-download-button.php

    r2880020 r2901151  
    55 * Plugin URI: https://github.com/kusimo/quick-download-button
    66 * Description: Use to add download button link to post or page.
    7  * Version: 1.2.4
     7 * Version: 1.2.5
    88 * Author: Abidemi Kusimo
    99 *
  • quick-download-button/tags/1.2.5/readme.txt

    r2880020 r2901151  
    11=== Quick Download Button ===
    22Contributors: kusimo
     3Donate link: https://www.buymeacoffee.com/kusimo
    34Tags: media download, hide download link, download button
    45License: GPLv2 or later
     
    67Requires at least: 3.0.1
    78Tested up to: 6.0.2
    8 Stable tag: 1.2.3
     9Stable tag: 1.2.5
    910Requires PHP: 5.6
    1011License: GPLv3
     
    126127echo do_shortcode('[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]');
    127128`
     129
     130== Donations ==
     131
     132Would you like to support the advancement of this plugin? [Donate](https://www.buymeacoffee.com/kusimo)
     133
    128134
    129135== Documentation ==
     
    226232== Changelog ==
    227233
     234= 1.2.5 April 19th, 2023 =
     235* Minor fixes of 404 error that occurs when quick download button page is deleted. After deletion of the QDB page, please deactivate and reactive the plugin.
     236
    228237= 1.2.4 March 13th, 2023 =
    229238* Fixed the error nonce did not verify when download link is external URL
  • quick-download-button/trunk/class/create.downloadpage.class.php

    r2767237 r2901151  
    2020
    2121        global $wpdb;
     22
    2223        $this->title = 'Quick Download Button';
    2324
    24         if ( null == get_page_by_title( $this->title, 'OBJECT', 'post' ) & $this->post_check_duplicates( $this->title ) !== 1 ) {
     25        if ( null == $this->get_page_by_title() ) {
    2526
    2627            $this->current_user = wp_get_current_user();
     
    5051        }
    5152
     53    }
     54
     55    /**
     56     * Used to check that the page exist before creating another page
     57     * after the plugin is activated.
     58     */
     59    public function get_page_by_title() {
     60        $page_got_by_title = null;
     61        $query = new WP_Query(
     62            array(
     63                'post_type'              => 'page',
     64                'title'                  => $this->title,
     65                'post_status'            => 'publish',
     66                'posts_per_page'         => 1,
     67                'no_found_rows'          => true,
     68                'ignore_sticky_posts'    => true,
     69                'update_post_term_cache' => false,
     70                'update_post_meta_cache' => false,
     71                'orderby'                => 'post_date ID',
     72                'order'                  => 'ASC',
     73            )
     74        );
     75         
     76        if ( ! empty( $query->post ) ) {
     77            $page_got_by_title = $query->post;
     78        }
     79
     80        return $page_got_by_title;
    5281    }
    5382
  • quick-download-button/trunk/quick-download-button.php

    r2880020 r2901151  
    55 * Plugin URI: https://github.com/kusimo/quick-download-button
    66 * Description: Use to add download button link to post or page.
    7  * Version: 1.2.4
     7 * Version: 1.2.5
    88 * Author: Abidemi Kusimo
    99 *
  • quick-download-button/trunk/readme.txt

    r2880020 r2901151  
    11=== Quick Download Button ===
    22Contributors: kusimo
     3Donate link: https://www.buymeacoffee.com/kusimo
    34Tags: media download, hide download link, download button
    45License: GPLv2 or later
     
    67Requires at least: 3.0.1
    78Tested up to: 6.0.2
    8 Stable tag: 1.2.3
     9Stable tag: 1.2.5
    910Requires PHP: 5.6
    1011License: GPLv3
     
    126127echo do_shortcode('[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]');
    127128`
     129
     130== Donations ==
     131
     132Would you like to support the advancement of this plugin? [Donate](https://www.buymeacoffee.com/kusimo)
     133
    128134
    129135== Documentation ==
     
    226232== Changelog ==
    227233
     234= 1.2.5 April 19th, 2023 =
     235* Minor fixes of 404 error that occurs when quick download button page is deleted. After deletion of the QDB page, please deactivate and reactive the plugin.
     236
    228237= 1.2.4 March 13th, 2023 =
    229238* Fixed the error nonce did not verify when download link is external URL
Note: See TracChangeset for help on using the changeset viewer.