Changeset 2797958
- Timestamp:
- 10/12/2022 06:09:05 PM (3 years ago)
- Location:
- easy-liveblogs
- Files:
-
- 10 edited
- 1 copied
-
tags/2.2.0 (copied) (copied from easy-liveblogs/trunk)
-
tags/2.2.0/README.md (modified) (1 diff)
-
tags/2.2.0/easy-liveblogs.php (modified) (2 diffs)
-
tags/2.2.0/includes/elb-functions.php (modified) (2 diffs)
-
tags/2.2.0/includes/elb-metabox.php (modified) (1 diff)
-
tags/2.2.0/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (1 diff)
-
trunk/easy-liveblogs.php (modified) (2 diffs)
-
trunk/includes/elb-functions.php (modified) (2 diffs)
-
trunk/includes/elb-metabox.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-liveblogs/tags/2.2.0/README.md
r2531947 r2797958 9 9 The plugin has tons of filter and action hooks so that developers can adjust the plugin to their liking. Feel free to contribute. 10 10 11 ## Release instruction for maintainers 12 * Update `readme.txt` (stable tag) and `easy-liveblogs.php` with the new release number. 13 14 11 15 ## Credits 12 16 -
easy-liveblogs/tags/2.2.0/easy-liveblogs.php
r2758531 r2797958 4 4 Plugin URI: https://vanrossum.dev 5 5 Description: Live blogging made easy with the Easy Liveblogs plugin from vanrossum.dev. 6 Version: 2. 1.36 Version: 2.2.0 7 7 Author: Jeffrey van Rossum 8 8 Author URI: https://www.vanrossum.dev … … 26 26 private $plugin_url; 27 27 private $plugin_name = 'Easy Liveblogs'; 28 private $plugin_version = '2. 1.3';28 private $plugin_version = '2.2.0'; 29 29 private $text_domain = 'easy-liveblogs'; 30 30 -
easy-liveblogs/tags/2.2.0/includes/elb-functions.php
r2738220 r2797958 403 403 */ 404 404 function 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; 410 408 } 411 409 … … 413 411 * Get entry URL. 414 412 * 415 * @return string 416 */ 417 function elb_get_entry_url() { 418 global $post; 413 * @param WP_Post|int|null $post 414 * @return string 415 */ 416 function 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 } 419 422 420 423 $liveblog_id = get_post_meta( $post->ID, '_elb_liveblog', true ); 421 424 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 ); 423 428 } 424 429 -
easy-liveblogs/tags/2.2.0/includes/elb-metabox.php
r2723705 r2797958 141 141 <div class="elb-input-group"> 142 142 <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"> 144 144 </div> 145 145 <?php } ?> -
easy-liveblogs/tags/2.2.0/readme.txt
r2758533 r2797958 7 7 Requires at least: 4.4 8 8 Tested up to: 6.0 9 Stable Tag: 2. 1.39 Stable Tag: 2.2.0 10 10 License: MIT 11 11 … … 39 39 40 40 = 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. 41 45 42 46 = 2.1.3, July 19th, 2022 = -
easy-liveblogs/trunk/README.md
r2531947 r2797958 9 9 The plugin has tons of filter and action hooks so that developers can adjust the plugin to their liking. Feel free to contribute. 10 10 11 ## Release instruction for maintainers 12 * Update `readme.txt` (stable tag) and `easy-liveblogs.php` with the new release number. 13 14 11 15 ## Credits 12 16 -
easy-liveblogs/trunk/easy-liveblogs.php
r2758531 r2797958 4 4 Plugin URI: https://vanrossum.dev 5 5 Description: Live blogging made easy with the Easy Liveblogs plugin from vanrossum.dev. 6 Version: 2. 1.36 Version: 2.2.0 7 7 Author: Jeffrey van Rossum 8 8 Author URI: https://www.vanrossum.dev … … 26 26 private $plugin_url; 27 27 private $plugin_name = 'Easy Liveblogs'; 28 private $plugin_version = '2. 1.3';28 private $plugin_version = '2.2.0'; 29 29 private $text_domain = 'easy-liveblogs'; 30 30 -
easy-liveblogs/trunk/includes/elb-functions.php
r2738220 r2797958 403 403 */ 404 404 function 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; 410 408 } 411 409 … … 413 411 * Get entry URL. 414 412 * 415 * @return string 416 */ 417 function elb_get_entry_url() { 418 global $post; 413 * @param WP_Post|int|null $post 414 * @return string 415 */ 416 function 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 } 419 422 420 423 $liveblog_id = get_post_meta( $post->ID, '_elb_liveblog', true ); 421 424 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 ); 423 428 } 424 429 -
easy-liveblogs/trunk/includes/elb-metabox.php
r2723705 r2797958 141 141 <div class="elb-input-group"> 142 142 <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"> 144 144 </div> 145 145 <?php } ?> -
easy-liveblogs/trunk/readme.txt
r2758533 r2797958 7 7 Requires at least: 4.4 8 8 Tested up to: 6.0 9 Stable Tag: 2. 1.39 Stable Tag: 2.2.0 10 10 License: MIT 11 11 … … 39 39 40 40 = 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. 41 45 42 46 = 2.1.3, July 19th, 2022 =
Note: See TracChangeset
for help on using the changeset viewer.