Plugin Directory

Changeset 2969373


Ignore:
Timestamp:
09/20/2023 04:39:41 PM (3 years ago)
Author:
alian
Message:

Added WooCommerce Return and Returns Policy page

Location:
display-post-link
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • display-post-link/trunk/display-post-link.php

    r2762277 r2969373  
    33 * Plugin Name: Display Post Link
    44 * Plugin URI: https://wordpress.org/plugins/display-post-link
    5  * Description: Displays the post link via shortcode.
    6  * Version: 1.0.0
     5 * Description: Display WordPress post/page links (homepage, blog, privacy, etc.) via shortcode in post/page content or widget area.
     6 * Version: 1.0.1
    77 * Requires at least: 5.2
    88 * Requires PHP: 7.2
     
    7272                }
    7373                break;
     74
     75            case 'woocommerce-refund-returns' :
     76                if ( class_exists( 'woocommerce' ) && ( wc_get_page_id( 'refund_returns' ) > 0) ) {
     77                    $args['url'] = get_permalink( wc_get_page_id( 'refund_returns' ) );
     78                    $args['title'] = get_the_title( wc_get_page_id( 'refund_returns' ) );
     79                }
    7480                break;
    7581
  • display-post-link/trunk/readme.txt

    r2762277 r2969373  
    33Tags: display link, show link, blog link, privacy policy link, WooCommerce pages link
    44Requires at least: 3.0.1
    5 Tested up to: 6.0.1
    6 Stable tag: 1.0.0
     5Tested up to: 6.3.1
     6Stable tag: 1.0.1
    77Requires PHP: 5.2.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Display post link via shortcode in post content or widget area. It is useful for the home page, blog page, privacy policy page and WooCommerce pages as there is no need to update the links manually. Compatible with the WPML plugin.
     11Display WordPress post/page links (homepage, blog, privacy, etc.) via shortcode in post/page content or widget area.
    1212
    1313== Description ==
    14 The shortcode [display-post-link] must be used to display the link in combination with the ID parameter (required).
    15 
    16 The WordPress options IDs available are: homepage, blog, privacy-policy.
     14This plugin was designed to return the correct link to the special WordPress pages such as the homepage, blog, privacy policy, etc.
     15The [display-post-link] shortcode must be used in combination with a Name to display the link.
    1716Example [display-post-link id="privacy-policy"]
    1817
    19 For WooCoommerce plugin, you can use these options IDs: woocommerce-shop, woocommerce-terms, woocommerce-cart, woocommerce-myaccount, woocommerce-checkout. WooCommerce plugin must be installed and active.
     18<strong>Main WordPress options names:</strong>
     19<ul>
     20<li>homepage</li>
     21<li>blog</li>
     22<li>privacy-policy</li>
     23</ul>
    2024
    21 You can also use the post ID number, but if you delete the post, the shortcode will not be able to display the link. For this reason, it is recommended to use the ID in number format only if you are sure you will not trash/delete the post or create a new one.
     25<strong>WooCommerce options names:</strong>
     26<ul>
     27<li>woocommerce-shop</li>
     28<li>woocommerce-terms</li>
     29<li>woocommerce-cart</li>
     30<li>woocommerce-myaccount</li>
     31<li>woocommerce-checkout</li>
     32<li>woocommerce-refund-returns</li>
     33</ul>
    2234
    23 The custom_title parameter can also be used to display a custom text link instead the post title.
     35Note: WooCommerce plugin must be installed and active if you would like to use the WooCommerce options names.
     36
     37It is also possible to use the numeric post/page ID instead of the name but if the post is deleted, the link will not be displayed.
     38
     39<strong>Custom title</strong>
     40A custom_title parameter can be used to display a custom text link instead of the post/page title.
    2441Example: [display-post-link id="privacy-policy" custom_title="Check it out our Privacy Policy!"]
     42
     43Compatible with WPML plugin.
    2544
    2645== Installation ==
     
    2948
    3049== Upgrade Notice ==
     50= 1.0.1 (2022-07-26) =
     51* Added WooCommerce Return and Returns Policy page
     52* Added plugin screenshots
    3153
    3254= 1.0.0 (2022-07-26) =
Note: See TracChangeset for help on using the changeset viewer.