Changeset 2776029
- Timestamp:
- 08/26/2022 09:54:51 AM (3 years ago)
- Location:
- custom-post-types
- Files:
-
- 24 added
- 3 edited
-
tags/3.0.14 (added)
-
tags/3.0.14/assets (added)
-
tags/3.0.14/assets/css (added)
-
tags/3.0.14/assets/css/backend.css (added)
-
tags/3.0.14/assets/icon-256x256.png (added)
-
tags/3.0.14/assets/icon.svg (added)
-
tags/3.0.14/assets/js (added)
-
tags/3.0.14/assets/js/backend.js (added)
-
tags/3.0.14/custom-post-types.php (added)
-
tags/3.0.14/inc (added)
-
tags/3.0.14/inc/Column.class.php (added)
-
tags/3.0.14/inc/Fields.class.php (added)
-
tags/3.0.14/inc/MetaBox.class.php (added)
-
tags/3.0.14/inc/Notice.class.php (added)
-
tags/3.0.14/inc/PostType.class.php (added)
-
tags/3.0.14/inc/Taxonomy.class.php (added)
-
tags/3.0.14/inc/Template.class.php (added)
-
tags/3.0.14/inc/functions.php (added)
-
tags/3.0.14/inc/loader-fields.php (added)
-
tags/3.0.14/inc/theme-supports-rules.php (added)
-
tags/3.0.14/languages (added)
-
tags/3.0.14/languages/custom-post-types.mo (added)
-
tags/3.0.14/languages/custom-post-types.pot (added)
-
tags/3.0.14/readme.txt (added)
-
trunk/custom-post-types.php (modified) (3 diffs)
-
trunk/inc/Notice.class.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-types/trunk/custom-post-types.php
r2766090 r2776029 2 2 /* 3 3 Plugin Name: Custom post types 4 Plugin URI: https://totalpress.org/plugins/custom-post-types ?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types4 Plugin URI: https://totalpress.org/plugins/custom-post-types 5 5 Description: Create / manage custom post types, custom taxonomies, custom fields and custom templates easily, directly from the WordPress dashboard without writing code. 6 6 Author: TotalPress.org 7 Author URI: https://totalpress.org/ ?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types7 Author URI: https://totalpress.org/ 8 8 Text Domain: custom-post-types 9 9 Domain Path: /languages/ 10 Version: 3.0.1 310 Version: 3.0.14 11 11 */ 12 12 … … 18 18 define('CPT_PATH', plugin_dir_path(__FILE__)); 19 19 define('CPT_URL', plugin_dir_url(__FILE__)); 20 define('CPT_PLUGIN_URL', 'https://totalpress.org/plugins/custom-post-types ?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');21 define('CPT_PLUGIN_DEV_URL', 'https://www.andreadegiovine.it/ ?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');22 define('CPT_PLUGIN_DOC_URL', 'https://totalpress.org/docs/custom-post-types.html ?doc&utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');23 define('CPT_PLUGIN_DONATE_URL', 'https://totalpress.org/donate ?utm_source=wp-dashboard&utm_medium=installed-plugin&utm_campaign=custom-post-types');20 define('CPT_PLUGIN_URL', 'https://totalpress.org/plugins/custom-post-types'); 21 define('CPT_PLUGIN_DEV_URL', 'https://www.andreadegiovine.it/'); 22 define('CPT_PLUGIN_DOC_URL', 'https://totalpress.org/docs/custom-post-types.html'); 23 define('CPT_PLUGIN_DONATE_URL', 'https://totalpress.org/donate'); 24 24 define('CPT_PLUGIN_WP_URL', 'https://wordpress.org/plugin/custom-post-types'); 25 25 define('CPT_PLUGIN_SUPPORT_URL', 'https://wordpress.org/support/plugin/custom-post-types'); … … 545 545 { 546 546 if (!is_admin()) return; 547 $buttons = [ 548 [ 549 'link' => CPT_PLUGIN_URL, 550 'label' => __('Get PRO version', 'custom-post-types'), 551 'target' => '_blank', 552 'cta' => true 553 ], 554 [ 555 'link' => CPT_PLUGIN_REVIEW_URL, 556 'label' => __('Write a Review', 'custom-post-types'), 557 'target' => '_blank' 558 ], 559 [ 560 'link' => CPT_PLUGIN_DONATE_URL, 561 'label' => __('Make a Donation', 'custom-post-types'), 562 'target' => '_blank' 563 ], 564 ]; 565 if ($this->is_pro_version_active()) { 566 unset($buttons[0]); 567 } 568 (new CPT\Notice)->add( 569 'welcome_notice', 570 __('Thanks for using this plugin! Do you want to help us grow to add new features?', 'custom-post-types') . '<br><br>' . sprintf(__('The new version %s introduces a lot of new features and improves the core of the plugin.<br>For any problems you can download the previous version %s from the official page of the plugin from WordPress.org (Advanced View > Previous version).', 'custom-post-types'), '<u>' . CPT_VER . '</u>', '<u>2.1.19</u>'), 571 'success', 572 false, 573 30, 574 $buttons 575 ); 547 if ( 548 cpt_is_current_screen($this->cpt_ui_name) || 549 cpt_is_current_screen($this->cpt_ui_name . '_tax') || 550 cpt_is_current_screen($this->cpt_ui_name . '_field') || 551 cpt_is_current_screen($this->cpt_ui_name . '_template') 552 ) { 553 $buttons = [ 554 [ 555 'link' => CPT_PLUGIN_REVIEW_URL, 556 'label' => __('Write a Review', 'custom-post-types'), 557 'target' => '_blank', 558 'cta' => true 559 ], 560 [ 561 'link' => CPT_PLUGIN_DONATE_URL, 562 'label' => __('Make a Donation', 'custom-post-types'), 563 'target' => '_blank' 564 ], 565 [ 566 'link' => CPT_PLUGIN_URL, 567 'label' => __('Get PRO version', 'custom-post-types'), 568 'target' => '_blank' 569 ], 570 ]; 571 if ($this->is_pro_version_active()) { 572 unset($buttons[0]); 573 } 574 (new CPT\Notice)->add( 575 'welcome_notice', 576 __('Thanks for using this plugin! Do you want to help us grow to add new features?', 'custom-post-types') . '<br><br>' . sprintf(__('The new version %s introduces a lot of new features and improves the core of the plugin.<br>For any problems you can download the previous version %s from the official page of the plugin from WordPress.org (Advanced View > Previous version).', 'custom-post-types'), '<u>' . CPT_VER . '</u>', '<u>2.1.19</u>'), 577 'success', 578 false, 579 -1, 580 $buttons 581 ); 582 } 576 583 577 584 -
custom-post-types/trunk/inc/Notice.class.php
r2627723 r2776029 15 15 public function dismissed_notices() 16 16 { 17 return get_option('custom_post_types_dismissed_notices', []); 17 $dismissed_notices = get_option('custom_post_types_dismissed_notices', []); 18 return is_array($dismissed_notices) ? $dismissed_notices : []; 18 19 } 19 20 public function dismiss_notice($id, int $days = 2) 20 21 { 21 22 $dismissed_notices = $this->dismissed_notices(); 23 if($days < 0) $days = 36500; 22 24 $dismissed_notices[$id] = strtotime("+$days day", time()); 23 25 update_option('custom_post_types_dismissed_notices', $dismissed_notices); … … 52 54 } 53 55 if ($close_btn) { 56 $button_label = $close_btn < 1 ? __('Dismiss notice', 'custom-post-types') : sprintf(__('Dismiss notice for %s days', 'custom-post-types'), (int) $close_btn); 54 57 $notice_buttons[] = sprintf( 55 58 '<a href="%s">%s</a>', 56 add_query_arg(['cpt-action' => 'dismiss', 'notice' => $key, 'days' => intval($close_btn), 'nonce' => wp_create_nonce('cpt-nonce')], $this->current_url()),57 sprintf(__('Dismiss notice for %s days', 'custom-post-types'), intval($close_btn))59 add_query_arg(['cpt-action' => 'dismiss', 'notice' => $key, 'days' => (int) $close_btn, 'nonce' => wp_create_nonce('cpt-nonce')], $this->current_url()), 60 $button_label 58 61 ); 59 62 } -
custom-post-types/trunk/readme.txt
r2766090 r2776029 5 5 Requires at least: 4.0 6 6 Tested up to: 6.0 7 Stable tag: 3.0.1 37 Stable tag: 3.0.14 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 206 206 == Changelog == 207 207 208 = 3.0.14 = 209 * Fixed wp-admin notices bug; 210 208 211 = 3.0.12 = 209 212 * Fixed $ is not a function; … … 456 459 == Upgrade Notice == 457 460 461 = 3.0.14 = 462 Fixed wp-admin notices bug; 463 458 464 = 3.0.13 = 459 465 Fixed refuse php
Note: See TracChangeset
for help on using the changeset viewer.