Plugin Directory

Changeset 2797958


Ignore:
Timestamp:
10/12/2022 06:09:05 PM (3 years ago)
Author:
jeffreyvr
Message:

Update to version 2.2.0 from GitHub

Location:
easy-liveblogs
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-liveblogs/tags/2.2.0/README.md

    r2531947 r2797958  
    99The plugin has tons of filter and action hooks so that developers can adjust the plugin to their liking. Feel free to contribute.
    1010
     11## Release instruction for maintainers
     12* Update `readme.txt` (stable tag) and `easy-liveblogs.php` with the new release number.
     13
     14
    1115## Credits
    1216
  • easy-liveblogs/tags/2.2.0/easy-liveblogs.php

    r2758531 r2797958  
    44Plugin URI: https://vanrossum.dev
    55Description: Live blogging made easy with the Easy Liveblogs plugin from vanrossum.dev.
    6 Version: 2.1.3
     6Version: 2.2.0
    77Author: Jeffrey van Rossum
    88Author URI: https://www.vanrossum.dev
     
    2626        private $plugin_url;
    2727        private $plugin_name    = 'Easy Liveblogs';
    28         private $plugin_version = '2.1.3';
     28        private $plugin_version = '2.2.0';
    2929        private $text_domain    = 'easy-liveblogs';
    3030
  • easy-liveblogs/tags/2.2.0/includes/elb-functions.php

    r2738220 r2797958  
    403403 */
    404404function elb_get_highlighted_entry_id() {
    405     if ( ! isset( $_GET['entry'] ) ) {
    406         return;
    407     }
    408 
    409     return filter_input( INPUT_GET, 'entry', FILTER_SANITIZE_NUMBER_INT );
     405    $entry_id = apply_filters( 'elb_highlighted_entry_id', filter_input( INPUT_GET, 'entry', FILTER_SANITIZE_NUMBER_INT ) );
     406
     407    return $entry_id;
    410408}
    411409
     
    413411 * Get entry URL.
    414412 *
    415  * @return string
    416  */
    417 function elb_get_entry_url() {
    418     global $post;
     413 * @param WP_Post|int|null $post
     414 * @return string
     415 */
     416function elb_get_entry_url( $post = null ) {
     417    if ( is_null( $post ) ) {
     418        global $post;
     419    } elseif( is_numeric( $post ) ) {
     420        $post = get_post( $post );
     421    }
    419422
    420423    $liveblog_id = get_post_meta( $post->ID, '_elb_liveblog', true );
    421424
    422     return add_query_arg( 'entry', $post->ID, get_permalink( $liveblog_id ) );
     425    $url = add_query_arg( 'entry', $post->ID, get_permalink( $liveblog_id ) );
     426
     427    return apply_filters( 'elb_entry_url', $url, $liveblog_id, $post );
    423428}
    424429
  • easy-liveblogs/tags/2.2.0/includes/elb-metabox.php

    r2723705 r2797958  
    141141            <div class="elb-input-group">
    142142                <label for="elb-liveblog-entry-link"><?php _e( 'Direct link to entry', ELB_TEXT_DOMAIN ); ?></label>
    143                 <input type="text" id="elb-liveblog-entry-link" onclick="this.focus(); this.select()" value="<?php echo add_query_arg( 'entry', $post_id, get_permalink( $liveblog ) ); ?>" readonly="readonly" class="widefat">
     143                <input type="text" id="elb-liveblog-entry-link" onclick="this.focus(); this.select()" value="<?php echo elb_get_entry_url( $post_id ); ?>" readonly="readonly" class="widefat">
    144144            </div>
    145145        <?php } ?>
  • easy-liveblogs/tags/2.2.0/readme.txt

    r2758533 r2797958  
    77Requires at least: 4.4
    88Tested up to: 6.0
    9 Stable Tag: 2.1.3
     9Stable Tag: 2.2.0
    1010License: MIT
    1111
     
    3939
    4040= Unreleased =
     41
     42= 2.2.0, October 12th, 2022 =
     43* Added filter hook (elb_entry_url) on entry url.
     44* Added filter hook (elb_highlighted_entry_id) on highlighted entry id.
    4145
    4246= 2.1.3, July 19th, 2022 =
  • easy-liveblogs/trunk/README.md

    r2531947 r2797958  
    99The plugin has tons of filter and action hooks so that developers can adjust the plugin to their liking. Feel free to contribute.
    1010
     11## Release instruction for maintainers
     12* Update `readme.txt` (stable tag) and `easy-liveblogs.php` with the new release number.
     13
     14
    1115## Credits
    1216
  • easy-liveblogs/trunk/easy-liveblogs.php

    r2758531 r2797958  
    44Plugin URI: https://vanrossum.dev
    55Description: Live blogging made easy with the Easy Liveblogs plugin from vanrossum.dev.
    6 Version: 2.1.3
     6Version: 2.2.0
    77Author: Jeffrey van Rossum
    88Author URI: https://www.vanrossum.dev
     
    2626        private $plugin_url;
    2727        private $plugin_name    = 'Easy Liveblogs';
    28         private $plugin_version = '2.1.3';
     28        private $plugin_version = '2.2.0';
    2929        private $text_domain    = 'easy-liveblogs';
    3030
  • easy-liveblogs/trunk/includes/elb-functions.php

    r2738220 r2797958  
    403403 */
    404404function elb_get_highlighted_entry_id() {
    405     if ( ! isset( $_GET['entry'] ) ) {
    406         return;
    407     }
    408 
    409     return filter_input( INPUT_GET, 'entry', FILTER_SANITIZE_NUMBER_INT );
     405    $entry_id = apply_filters( 'elb_highlighted_entry_id', filter_input( INPUT_GET, 'entry', FILTER_SANITIZE_NUMBER_INT ) );
     406
     407    return $entry_id;
    410408}
    411409
     
    413411 * Get entry URL.
    414412 *
    415  * @return string
    416  */
    417 function elb_get_entry_url() {
    418     global $post;
     413 * @param WP_Post|int|null $post
     414 * @return string
     415 */
     416function elb_get_entry_url( $post = null ) {
     417    if ( is_null( $post ) ) {
     418        global $post;
     419    } elseif( is_numeric( $post ) ) {
     420        $post = get_post( $post );
     421    }
    419422
    420423    $liveblog_id = get_post_meta( $post->ID, '_elb_liveblog', true );
    421424
    422     return add_query_arg( 'entry', $post->ID, get_permalink( $liveblog_id ) );
     425    $url = add_query_arg( 'entry', $post->ID, get_permalink( $liveblog_id ) );
     426
     427    return apply_filters( 'elb_entry_url', $url, $liveblog_id, $post );
    423428}
    424429
  • easy-liveblogs/trunk/includes/elb-metabox.php

    r2723705 r2797958  
    141141            <div class="elb-input-group">
    142142                <label for="elb-liveblog-entry-link"><?php _e( 'Direct link to entry', ELB_TEXT_DOMAIN ); ?></label>
    143                 <input type="text" id="elb-liveblog-entry-link" onclick="this.focus(); this.select()" value="<?php echo add_query_arg( 'entry', $post_id, get_permalink( $liveblog ) ); ?>" readonly="readonly" class="widefat">
     143                <input type="text" id="elb-liveblog-entry-link" onclick="this.focus(); this.select()" value="<?php echo elb_get_entry_url( $post_id ); ?>" readonly="readonly" class="widefat">
    144144            </div>
    145145        <?php } ?>
  • easy-liveblogs/trunk/readme.txt

    r2758533 r2797958  
    77Requires at least: 4.4
    88Tested up to: 6.0
    9 Stable Tag: 2.1.3
     9Stable Tag: 2.2.0
    1010License: MIT
    1111
     
    3939
    4040= Unreleased =
     41
     42= 2.2.0, October 12th, 2022 =
     43* Added filter hook (elb_entry_url) on entry url.
     44* Added filter hook (elb_highlighted_entry_id) on highlighted entry id.
    4145
    4246= 2.1.3, July 19th, 2022 =
Note: See TracChangeset for help on using the changeset viewer.