Support » Plugin: WP Favorite Posts » [Plugin: WP Favorite Posts] Successful addition of Grey Toggle Image Functionality

  • Resolved silfani

    (@silfani)


    I managed to edit the plugin to toggle the star image from yellow to grey. Here’s the crude, but working hack:

    1. Create star-grey.png image by desaturating the provided star.png image.

    2. Add the following function:

    function wpfp_before_link_img_grey() {
        $options = wpfp_get_options();
        $option = $options['before_image_grey'];
        return "<img src='". WPFP_PATH . "/img/star-grey.png' alt='Not Favorite' title='Not Favorite' class='wpfp-img' />";
    }

    Note it skips the options variable for now.

    Added the following code to the main wpfp_link function:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    This seems to work really well once the Show remove link and Show add link functions are enabled on the plugins admin page.

    Next up, create a downloadable version of the favorites list. Thanks Huseyin for a great plugin.

    http://wordpress.org/extend/plugins/wp-favorite-posts/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Favorite Posts] Successful addition of Grey Toggle Image Functionality’ is closed to new replies.