WordPress.org

Ready to get started?Download WordPress

Forums

Expiring Blogroll Entries (6 posts)

  1. jclayc
    Member
    Posted 4 years ago #

    hey everyone - I have an interesting project... an easy one, i think: setting an expiration date on a Blogroll link. I've checked all the management plugins and don't see this feature for links.

    The way I figure, you could use the Link "Notes" entry to record an expiration date and then modify wp_list_bookmarks to run a date check loop against it.

    Anyone with any helpful code or a plugin I've missed? I can find the expiration code, but I don't see where the core wp_list_bookmarks function is located for me to hack on....

    Thanks in advance

  2. MichaelH
    Member
    Posted 4 years ago #

    Using http://wingrep.com found wp_list_bookmarks function in wp-includes/bookmark-template.php

  3. jclayc
    Member
    Posted 4 years ago #

    thank you!

  4. mariuslihet
    Member
    Posted 4 years ago #

    I need also the same plugin :)

    Can you please share with us this plugin.

    Thanks!
    Cheers!

  5. sjunianto
    Member
    Posted 4 years ago #

    hi jclayc!
    did you have explored this? can you share the solution with us? i also need this feature for my project. thank you :)

  6. sjunianto
    Member
    Posted 4 years ago #

    hi all!
    regarding the method from jclayc (using link_notes field to save the expired date of link), i just add this code in line 65 of wp-includes/bookmark-template.php file :

    before :

    foreach ( (array) $bookmarks as $bookmark ) {
    		if ( !isset($bookmark->recently_updated) )

    after :

    foreach ( (array) $bookmarks as $bookmark ) {
                    // this is additional line :
                    if ($bookmark->link_notes<>'' && $bookmark->link_notes < date("Y-m-d")) continue;
    		if ( !isset($bookmark->recently_updated) )

    in this case i used this date format : YYYY-MM-DD.

    cmiiw.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags