Changeset 3419653
- Timestamp:
- 12/15/2025 03:18:57 AM (3 months ago)
- Location:
- wcboost-wishlist/trunk
- Files:
-
- 9 edited
-
includes/admin/settings.php (modified) (2 diffs)
-
includes/frontend.php (modified) (2 diffs)
-
includes/query.php (modified) (1 diff)
-
includes/templates.php (modified) (2 diffs)
-
includes/wishlist.php (modified) (3 diffs)
-
languages/wcboost-wishlist.pot (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/wishlist/form-edit-wishlist.php (modified) (2 diffs)
-
wcboost-wishlist.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wcboost-wishlist/trunk/includes/admin/settings.php
r3370850 r3419653 27 27 28 28 // Add settings of endpoints to the Advanced tab. 29 add_filter( 'woocommerce_ settings_pages', [ $this, 'get_endpoint_settings' ] );29 add_filter( 'woocommerce_get_settings_advanced', [ $this, 'get_endpoint_settings' ] ); 30 30 31 31 parent::__construct(); … … 419 419 ]; 420 420 421 $endpoint_settings = apply_filters( 'wcboost_wishlist_endpoint_settings', $endpoint_settings ); 422 421 423 return array_merge( $settings, $endpoint_settings ); 422 424 } -
wcboost-wishlist/trunk/includes/frontend.php
r3370850 r3419653 88 88 // Display buttons in the wishlist widget. 89 89 add_action( 'wcboost_wishlist_widget_buttons', [ $this, 'widget_buttons' ], 10, 2 ); 90 91 // Change the page title and heading for the wishlist endpoints. 92 add_filter( 'document_title_parts', [ $this, 'wishlist_endpoints_page_title' ] ); 93 add_filter( 'the_title', [ $this, 'wishlist_endpoints_page_heading' ] ); 90 94 } 91 95 … … 553 557 Session::instance()->maybe_set_cookies(); 554 558 } 559 560 /** 561 * Filter the page title for wishlist endpoints 562 * 563 * Changes the page title when viewing manage-wishlists or add-wishlist endpoints. 564 * Similar to how WooCommerce handles My Account page endpoints. 565 * 566 * @since 1.2.3 567 * 568 * @param array $title_parts The document title parts. 569 * @return array Modified title parts. 570 */ 571 public function wishlist_endpoints_page_title( $title_parts ) { 572 if ( ! Helper::is_wishlist() ) { 573 return $title_parts; 574 } 575 576 if ( get_query_var( 'edit-wishlist' ) ) { 577 $title_parts['title'] = __( 'Edit Wishlist', 'wcboost-wishlist' ); 578 } 579 580 return $title_parts; 581 } 582 583 /** 584 * Filter the page heading for wishlist endpoints 585 * 586 * @since 1.2.3 587 * 588 * @param string $title The page title. 589 * @return string Modified page title. 590 */ 591 public function wishlist_endpoints_page_heading( $title ) { 592 if ( ! in_the_loop() || ! is_main_query() || ! Helper::is_wishlist() ) { 593 return $title; 594 } 595 596 if ( get_query_var( 'edit-wishlist' ) ) { 597 $title = esc_html__( 'Edit wishlist', 'wcboost-wishlist' ); 598 } 599 600 return $title; 601 } 555 602 } -
wcboost-wishlist/trunk/includes/query.php
r3370850 r3419653 250 250 * Get all wishlits of current user 251 251 * 252 * @return array252 * @return \WCBoost\Wishlist\Wishlist[] Array of wishlists 253 253 */ 254 254 public function get_user_wishlists() { -
wcboost-wishlist/trunk/includes/templates.php
r3370850 r3419653 195 195 } 196 196 197 $args = apply_filters( 'wcboost_wishlist_button_template_args', $args, $wishlist, $product );198 $args['class'] = implode( ' ', (array) $args['class'] );199 200 197 // Add a new key "attributes", 201 198 // but must keep orginal keys to ensure backwards compatibility. … … 210 207 $args['attributes']['data-variations'] = wp_json_encode( $args['variations_data'] ); 211 208 } 209 210 $args = apply_filters( 'wcboost_wishlist_button_template_args', $args, $wishlist, $product ); 211 $args['class'] = implode( ' ', (array) $args['class'] ); 212 212 213 213 return $args; -
wcboost-wishlist/trunk/includes/wishlist.php
r3370850 r3419653 807 807 * Also set the session id for guests. 808 808 * 809 * @return void809 * @return int 810 810 */ 811 811 public function save() { … … 817 817 Session::set_session_id( $this->get_session_id() ); 818 818 } 819 820 return $this->get_id(); 819 821 } 820 822 … … 1048 1050 1049 1051 if ( $merged && ! is_wp_error( $merged ) ) { 1050 $merged_count++;1052 ++$merged_count; 1051 1053 } 1052 1054 } -
wcboost-wishlist/trunk/languages/wcboost-wishlist.pot
r3370850 r3419653 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WCBoost - Wishlist 1.2. 2\n"5 "Project-Id-Version: WCBoost - Wishlist 1.2.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wcboost-wishlist\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-1 0-01T05:16:50+00:00\n"12 "POT-Creation-Date: 2025-12-15T03:03:36+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 175 175 #: includes/customizer/customizer.php:341 176 176 #: includes/form-handler.php:111 177 #: includes/frontend.php:52 1177 #: includes/frontend.php:525 178 178 #: includes/helper.php:208 179 179 msgid "View wishlist" … … 386 386 387 387 #: includes/admin/settings.php:408 388 #: includes/frontend.php:338 388 #: includes/frontend.php:342 389 #: includes/frontend.php:597 389 390 msgid "Edit wishlist" 390 391 msgstr "" … … 646 647 msgstr "" 647 648 648 #: includes/frontend.php:15 1649 #: includes/frontend.php:155 649 650 msgid "The wishlist link is copied to clipboard" 650 651 msgstr "" 651 652 652 #: includes/frontend.php:15 2653 #: includes/frontend.php:156 653 654 msgid "Close" 654 655 msgstr "" 655 656 656 #: includes/frontend.php:3 16657 #: includes/frontend.php:320 657 658 msgid "Share" 658 659 msgstr "" 659 660 660 #: includes/frontend.php:3 69661 #: includes/frontend.php:373 661 662 #: templates/wishlist/form-delete-wishlist.php:31 662 663 msgid "Delete wishlist" 663 664 msgstr "" 664 665 665 #: includes/frontend.php:37 0666 #: includes/frontend.php:374 666 667 msgid "Delete the wishlist and all items it contains" 667 668 msgstr "" 668 669 669 #: includes/frontend.php:39 1670 #: includes/frontend.php:395 670 671 msgid "Delete" 672 msgstr "" 673 674 #: includes/frontend.php:577 675 msgid "Edit Wishlist" 671 676 msgstr "" 672 677 … … 822 827 msgstr "" 823 828 824 #: templates/wishlist/form-edit-wishlist.php:21 825 msgid "Edit Wishlist" 826 msgstr "" 827 828 #: templates/wishlist/form-edit-wishlist.php:30 829 #: templates/wishlist/form-edit-wishlist.php:29 829 830 msgid "Wishlist name" 830 831 msgstr "" 831 832 832 #: templates/wishlist/form-edit-wishlist.php:4 2833 #: templates/wishlist/form-edit-wishlist.php:41 833 834 msgid "Description" 834 835 msgstr "" 835 836 836 #: templates/wishlist/form-edit-wishlist.php:5 7837 #: templates/wishlist/form-edit-wishlist.php:56 837 838 msgid "Privacy settings" 838 839 msgstr "" 839 840 841 #: templates/wishlist/form-edit-wishlist.php:58 842 msgid "Public - Anyone can view this list. Everyone can share this list." 843 msgstr "" 844 840 845 #: templates/wishlist/form-edit-wishlist.php:59 841 msgid " Public - Anyone can view this list. Everyonecan share this list."846 msgid "Shared - Only people with the link can view this list. Only you can share this list." 842 847 msgstr "" 843 848 844 849 #: templates/wishlist/form-edit-wishlist.php:60 845 msgid "Shared - Only people with the link can view this list. Only you can share this list."846 msgstr ""847 848 #: templates/wishlist/form-edit-wishlist.php:61849 850 msgid "Private - Only you can view this list." 850 851 msgstr "" 851 852 853 #: templates/wishlist/form-edit-wishlist.php:70 854 msgid "Save changes" 855 msgstr "" 856 852 857 #: templates/wishlist/form-edit-wishlist.php:71 853 msgid "Save changes"854 msgstr ""855 856 #: templates/wishlist/form-edit-wishlist.php:72857 858 msgid "Cancel" 858 859 msgstr "" -
wcboost-wishlist/trunk/readme.txt
r3370850 r3419653 2 2 Contributors: wcboost 3 3 Tags: woocommerce wishlist, wishlist, products, e-commerce, woocommerce 4 Tested up to: 6. 85 Stable tag: 1.2. 24 Tested up to: 6.9 5 Stable tag: 1.2.3 6 6 Requires PHP: 7.0 7 7 Requires at least: 4.5 8 8 WC requires at least: 3.0.0 9 WC tested up to: 10. 29 WC tested up to: 10.4 10 10 License: GPLv3 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 94 94 95 95 == Changelog == 96 97 = 1.2.3 = 98 - Enhancement - Update Wishlist edit template to allow title customization. 99 - Tweak - WordPress 6.9 compatibility. 100 - Tweak – WooCommerce 10.4 compatibility. 101 - Dev - Add filter to modify page title and heading for wishlist endpoints. 102 - Dev - Add filter for endpoint settings. 96 103 97 104 = 1.2.2 = -
wcboost-wishlist/trunk/templates/wishlist/form-edit-wishlist.php
r3370850 r3419653 7 7 * @author WCBoost 8 8 * @package WCBoost\Wishlist\Templates 9 * @version 1.2. 29 * @version 1.2.3 10 10 */ 11 11 … … 19 19 20 20 <form class="wcboost-wishlist-form-edit" method="post"> 21 <h3><?php esc_html_e( 'Edit Wishlist', 'wcboost-wishlist' ); ?></h3>22 21 23 22 <?php -
wcboost-wishlist/trunk/wcboost-wishlist.php
r3370850 r3419653 5 5 * Plugin URI: https://wcboost.com/plugin/woocommerce-wishlist/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 6 6 * Author: WCBoost 7 * Version: 1.2. 27 * Version: 1.2.3 8 8 * Author URI: https://wcboost.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash 9 9 * … … 13 13 * Requires PHP: 7.0 14 14 * Requires at least: 4.5 15 * Tested up to: 6. 8.315 * Tested up to: 6.9 16 16 * WC requires at least: 3.0.0 17 * WC tested up to: 10. 2.217 * WC tested up to: 10.4 18 18 * License: GPLv3 or later 19 19 * … … 26 26 27 27 if ( ! defined( 'WCBOOST_WISHLIST_VERSION' ) ) { 28 define( 'WCBOOST_WISHLIST_VERSION', '1.2. 2' );28 define( 'WCBOOST_WISHLIST_VERSION', '1.2.3' ); 29 29 } 30 30 … … 43 43 44 44 // Declare compatibility with WooCommerce features. 45 add_action( 'before_woocommerce_init', function () {45 add_action( 'before_woocommerce_init', function () { 46 46 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 47 47 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); … … 103 103 } 104 104 105 register_activation_hook( __FILE__, 'wcboost_wishlist_activate' );105 register_activation_hook( __FILE__, 'wcboost_wishlist_activate' ); 106 106 }
Note: See TracChangeset
for help on using the changeset viewer.