Changeset 3795677
- Timestamp:
- 11/11/2026 05:11:31 AM (10 hours ago)
- Location:
- pressklip-post-tag-manager
- Files:
-
- 10 edited
- 1 copied
-
tags/1.0.1 (copied) (copied from pressklip-post-tag-manager/trunk )
-
tags/1.0.1/assets/admin.css (modified) (1 diff)
-
tags/1.0.1/includes/class-tiertags-admin.php (modified) (4 diffs)
-
tags/1.0.1/pressklip-post-tag-manager.php (modified) (2 diffs)
-
tags/1.0.1/readme.txt (modified) (3 diffs)
-
tags/1.0.1/uninstall.php (modified) (1 diff)
-
trunk/assets/admin.css (modified) (1 diff)
-
trunk/includes/class-tiertags-admin.php (modified) (4 diffs)
-
trunk/pressklip-post-tag-manager.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pressklip-post-tag-manager/tags/1.0.1/assets/admin.css
r3795598 r3795677 619 619 } 620 620 621 .tiertags-family { 622 margin: 22px 0 0; 623 padding: 14px 18px; 624 background: var(--tt-card); 625 border: 1px solid var(--tt-line); 626 border-radius: 10px; 627 } 628 629 .tiertags-family__head { 630 display: flex; 631 align-items: center; 632 justify-content: space-between; 633 gap: 12px; 634 } 635 636 .tiertags-family h2 { 637 margin: 0; 638 color: var(--tt-text); 639 font-size: 14px; 640 } 641 642 .wp-core-ui .tiertags-family .button-link { 643 color: var(--tt-link); 644 } 645 646 .tiertags-family ul { 647 margin: 10px 0 0; 648 } 649 650 .tiertags-family li { 651 margin: 6px 0 0; 652 color: var(--tt-muted); 653 } 654 655 .tiertags-family li a { 656 margin-right: 6px; 657 font-weight: 600; 658 } 659 621 660 .tiertags-foot { 622 661 margin: 22px 0 0; -
pressklip-post-tag-manager/tags/1.0.1/includes/class-tiertags-admin.php
r3795598 r3795677 23 23 const TAB_ARG = 'tiertags_tax'; 24 24 25 /** User meta: this admin hid the "More from PressKlip" card. */ 26 const FAMILY_META = 'tiertags_family_hidden'; 27 25 28 /** @var string Hook suffix of the Tag Manager screen. */ 26 29 private static $hook = ''; … … 30 33 add_action( 'admin_enqueue_scripts', array( __CLASS__, 'assets' ) ); 31 34 add_action( 'admin_post_tiertags_settings', array( __CLASS__, 'handle_settings' ) ); 35 add_action( 'admin_post_tiertags_hide_family', array( __CLASS__, 'handle_hide_family' ) ); 32 36 add_filter( 'plugin_action_links_' . plugin_basename( TIERTAGS_FILE ), array( __CLASS__, 'action_links' ) ); 33 37 add_action( 'admin_init', array( __CLASS__, 'term_screens' ) ); … … 257 261 <?php endif; ?> 258 262 263 <?php if ( $is_admin ) : ?> 264 <?php self::render_family( $taxonomy ); ?> 265 <?php endif; ?> 266 259 267 <p class="tiertags-foot"> 260 268 <?php esc_html_e( 'A free plugin from the PressKlip family.', 'pressklip-post-tag-manager' ); ?> … … 348 356 </form> 349 357 <?php 358 } 359 360 /** 361 * The other PressKlip plugins this site does not run yet, at the bottom of 362 * this plugin's own screen only (Phillip, 2026-11-10). WordPress.org allows 363 * this as long as it stays here and can be turned off: never a site-wide 364 * notice, and nothing in this plugin ever waits on a paid product. 365 * 366 * @param string $taxonomy Current taxonomy, to return to after hiding. 367 */ 368 private static function render_family( $taxonomy ) { 369 if ( get_user_meta( get_current_user_id(), self::FAMILY_META, true ) ) { 370 return; 371 } 372 $products = array(); 373 if ( ! defined( 'PK_VERSION' ) ) { 374 $products[] = array( 375 'name' => 'PressKlip Video', 376 'text' => __( 'Import your YouTube channel into WordPress as real posts you own, with a branded player and 11 layouts. Has a free plan.', 'pressklip-post-tag-manager' ), 377 'url' => 'https://pressklip.com/video/', 378 ); 379 } 380 if ( ! defined( 'PS_VERSION' ) ) { 381 $products[] = array( 382 'name' => 'PressKlip Social', 383 'text' => __( 'Import your own Instagram, Facebook Page and TikTok posts into WordPress as real posts you own. Has a free plan.', 'pressklip-post-tag-manager' ), 384 'url' => 'https://pressklip.com/social/', 385 ); 386 } 387 if ( ! $products ) { 388 return; 389 } 390 ?> 391 <div class="tiertags-family"> 392 <div class="tiertags-family__head"> 393 <h2><?php esc_html_e( 'More from PressKlip', 'pressklip-post-tag-manager' ); ?></h2> 394 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>"> 395 <input type="hidden" name="action" value="tiertags_hide_family"> 396 <input type="hidden" name="<?php echo esc_attr( self::TAB_ARG ); ?>" value="<?php echo esc_attr( $taxonomy ); ?>"> 397 <?php wp_nonce_field( 'tiertags_hide_family' ); ?> 398 <button type="submit" class="button-link"><?php esc_html_e( 'Hide this', 'pressklip-post-tag-manager' ); ?></button> 399 </form> 400 </div> 401 <ul> 402 <?php foreach ( $products as $product ) : ?> 403 <li> 404 <a href="<?php echo esc_url( $product['url'] ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $product['name'] ); ?></a> 405 <span><?php echo esc_html( $product['text'] ); ?></span> 406 </li> 407 <?php endforeach; ?> 408 </ul> 409 </div> 410 <?php 411 } 412 413 /** Per user, and for good: each admin decides for themselves. */ 414 public static function handle_hide_family() { 415 check_admin_referer( 'tiertags_hide_family' ); 416 if ( ! current_user_can( 'manage_options' ) ) { 417 wp_die( esc_html__( 'You cannot change these settings.', 'pressklip-post-tag-manager' ), '', array( 'response' => 403 ) ); 418 } 419 update_user_meta( get_current_user_id(), self::FAMILY_META, 1 ); 420 $back = isset( $_POST[ self::TAB_ARG ] ) ? sanitize_key( wp_unslash( $_POST[ self::TAB_ARG ] ) ) : ''; 421 wp_safe_redirect( self::url( array( self::TAB_ARG => $back ) ) ); 422 exit; 350 423 } 351 424 -
pressklip-post-tag-manager/tags/1.0.1/pressklip-post-tag-manager.php
r3795598 r3795677 3 3 * Plugin Name: PressKlip Post Tag Manager 4 4 * Description: See every tag you have, hide the ones you are done with and every post that carries them, and keep the few posts you still want showing. Nothing is deleted. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Requires at least: 6.2 7 7 * Requires PHP: 7.4 … … 19 19 } 20 20 21 define( 'TIERTAGS_VERSION', '1.0. 0' );21 define( 'TIERTAGS_VERSION', '1.0.1' ); 22 22 define( 'TIERTAGS_FILE', __FILE__ ); 23 23 define( 'TIERTAGS_DIR', plugin_dir_path( __FILE__ ) ); -
pressklip-post-tag-manager/tags/1.0.1/readme.txt
r3795598 r3795677 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 115 115 == Changelog == 116 116 117 = 1.0.1 = 118 * Added: a small "More from PressKlip" card at the bottom of this plugin's own screen. It lists only the PressKlip plugins your site does not run, and "Hide this" removes it for good. 119 117 120 = 1.0.0 = 118 121 * First release. … … 120 123 == Upgrade Notice == 121 124 125 = 1.0.1 = 126 Adds a small card you can hide at the bottom of the plugin's screen. Nothing else changes. 127 122 128 = 1.0.0 = 123 129 First release. -
pressklip-post-tag-manager/tags/1.0.1/uninstall.php
r3795598 r3795677 18 18 delete_transient( 'tiertags_hidden_ids' ); 19 19 delete_metadata( 'post', 0, '_tiertags_visibility', '', true ); 20 delete_metadata( 'user', 0, 'tiertags_family_hidden', '', true ); 20 21 21 22 // Every term meta key the plugin has used (tiertags_hidden, and tiertags_tier -
pressklip-post-tag-manager/trunk/assets/admin.css
r3795598 r3795677 619 619 } 620 620 621 .tiertags-family { 622 margin: 22px 0 0; 623 padding: 14px 18px; 624 background: var(--tt-card); 625 border: 1px solid var(--tt-line); 626 border-radius: 10px; 627 } 628 629 .tiertags-family__head { 630 display: flex; 631 align-items: center; 632 justify-content: space-between; 633 gap: 12px; 634 } 635 636 .tiertags-family h2 { 637 margin: 0; 638 color: var(--tt-text); 639 font-size: 14px; 640 } 641 642 .wp-core-ui .tiertags-family .button-link { 643 color: var(--tt-link); 644 } 645 646 .tiertags-family ul { 647 margin: 10px 0 0; 648 } 649 650 .tiertags-family li { 651 margin: 6px 0 0; 652 color: var(--tt-muted); 653 } 654 655 .tiertags-family li a { 656 margin-right: 6px; 657 font-weight: 600; 658 } 659 621 660 .tiertags-foot { 622 661 margin: 22px 0 0; -
pressklip-post-tag-manager/trunk/includes/class-tiertags-admin.php
r3795598 r3795677 23 23 const TAB_ARG = 'tiertags_tax'; 24 24 25 /** User meta: this admin hid the "More from PressKlip" card. */ 26 const FAMILY_META = 'tiertags_family_hidden'; 27 25 28 /** @var string Hook suffix of the Tag Manager screen. */ 26 29 private static $hook = ''; … … 30 33 add_action( 'admin_enqueue_scripts', array( __CLASS__, 'assets' ) ); 31 34 add_action( 'admin_post_tiertags_settings', array( __CLASS__, 'handle_settings' ) ); 35 add_action( 'admin_post_tiertags_hide_family', array( __CLASS__, 'handle_hide_family' ) ); 32 36 add_filter( 'plugin_action_links_' . plugin_basename( TIERTAGS_FILE ), array( __CLASS__, 'action_links' ) ); 33 37 add_action( 'admin_init', array( __CLASS__, 'term_screens' ) ); … … 257 261 <?php endif; ?> 258 262 263 <?php if ( $is_admin ) : ?> 264 <?php self::render_family( $taxonomy ); ?> 265 <?php endif; ?> 266 259 267 <p class="tiertags-foot"> 260 268 <?php esc_html_e( 'A free plugin from the PressKlip family.', 'pressklip-post-tag-manager' ); ?> … … 348 356 </form> 349 357 <?php 358 } 359 360 /** 361 * The other PressKlip plugins this site does not run yet, at the bottom of 362 * this plugin's own screen only (Phillip, 2026-11-10). WordPress.org allows 363 * this as long as it stays here and can be turned off: never a site-wide 364 * notice, and nothing in this plugin ever waits on a paid product. 365 * 366 * @param string $taxonomy Current taxonomy, to return to after hiding. 367 */ 368 private static function render_family( $taxonomy ) { 369 if ( get_user_meta( get_current_user_id(), self::FAMILY_META, true ) ) { 370 return; 371 } 372 $products = array(); 373 if ( ! defined( 'PK_VERSION' ) ) { 374 $products[] = array( 375 'name' => 'PressKlip Video', 376 'text' => __( 'Import your YouTube channel into WordPress as real posts you own, with a branded player and 11 layouts. Has a free plan.', 'pressklip-post-tag-manager' ), 377 'url' => 'https://pressklip.com/video/', 378 ); 379 } 380 if ( ! defined( 'PS_VERSION' ) ) { 381 $products[] = array( 382 'name' => 'PressKlip Social', 383 'text' => __( 'Import your own Instagram, Facebook Page and TikTok posts into WordPress as real posts you own. Has a free plan.', 'pressklip-post-tag-manager' ), 384 'url' => 'https://pressklip.com/social/', 385 ); 386 } 387 if ( ! $products ) { 388 return; 389 } 390 ?> 391 <div class="tiertags-family"> 392 <div class="tiertags-family__head"> 393 <h2><?php esc_html_e( 'More from PressKlip', 'pressklip-post-tag-manager' ); ?></h2> 394 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>"> 395 <input type="hidden" name="action" value="tiertags_hide_family"> 396 <input type="hidden" name="<?php echo esc_attr( self::TAB_ARG ); ?>" value="<?php echo esc_attr( $taxonomy ); ?>"> 397 <?php wp_nonce_field( 'tiertags_hide_family' ); ?> 398 <button type="submit" class="button-link"><?php esc_html_e( 'Hide this', 'pressklip-post-tag-manager' ); ?></button> 399 </form> 400 </div> 401 <ul> 402 <?php foreach ( $products as $product ) : ?> 403 <li> 404 <a href="<?php echo esc_url( $product['url'] ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $product['name'] ); ?></a> 405 <span><?php echo esc_html( $product['text'] ); ?></span> 406 </li> 407 <?php endforeach; ?> 408 </ul> 409 </div> 410 <?php 411 } 412 413 /** Per user, and for good: each admin decides for themselves. */ 414 public static function handle_hide_family() { 415 check_admin_referer( 'tiertags_hide_family' ); 416 if ( ! current_user_can( 'manage_options' ) ) { 417 wp_die( esc_html__( 'You cannot change these settings.', 'pressklip-post-tag-manager' ), '', array( 'response' => 403 ) ); 418 } 419 update_user_meta( get_current_user_id(), self::FAMILY_META, 1 ); 420 $back = isset( $_POST[ self::TAB_ARG ] ) ? sanitize_key( wp_unslash( $_POST[ self::TAB_ARG ] ) ) : ''; 421 wp_safe_redirect( self::url( array( self::TAB_ARG => $back ) ) ); 422 exit; 350 423 } 351 424 -
pressklip-post-tag-manager/trunk/pressklip-post-tag-manager.php
r3795598 r3795677 3 3 * Plugin Name: PressKlip Post Tag Manager 4 4 * Description: See every tag you have, hide the ones you are done with and every post that carries them, and keep the few posts you still want showing. Nothing is deleted. 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Requires at least: 6.2 7 7 * Requires PHP: 7.4 … … 19 19 } 20 20 21 define( 'TIERTAGS_VERSION', '1.0. 0' );21 define( 'TIERTAGS_VERSION', '1.0.1' ); 22 22 define( 'TIERTAGS_FILE', __FILE__ ); 23 23 define( 'TIERTAGS_DIR', plugin_dir_path( __FILE__ ) ); -
pressklip-post-tag-manager/trunk/readme.txt
r3795598 r3795677 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 115 115 == Changelog == 116 116 117 = 1.0.1 = 118 * Added: a small "More from PressKlip" card at the bottom of this plugin's own screen. It lists only the PressKlip plugins your site does not run, and "Hide this" removes it for good. 119 117 120 = 1.0.0 = 118 121 * First release. … … 120 123 == Upgrade Notice == 121 124 125 = 1.0.1 = 126 Adds a small card you can hide at the bottom of the plugin's screen. Nothing else changes. 127 122 128 = 1.0.0 = 123 129 First release. -
pressklip-post-tag-manager/trunk/uninstall.php
r3795598 r3795677 18 18 delete_transient( 'tiertags_hidden_ids' ); 19 19 delete_metadata( 'post', 0, '_tiertags_visibility', '', true ); 20 delete_metadata( 'user', 0, 'tiertags_family_hidden', '', true ); 20 21 21 22 // Every term meta key the plugin has used (tiertags_hidden, and tiertags_tier
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)