Plugin Directory

Changeset 1067529


Ignore:
Timestamp:
01/14/2015 12:35:14 AM (11 years ago)
Author:
ciaranm
Message:

Improving handling of untagged links

Location:
pocket-wp/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pocket-wp/trunk/pocket-wp.php

    r1067446 r1067529  
    44 * Plugin URI: http://ciaranmahoney.me/pocket-wp
    55 * Description: Adds a shortcode and widget which allows you to display your pocket links in a WordPress page/post.
    6  * Version: 0.4.1
     6 * Version: 0.4.2
    77 * Author: Ciaran Mahoney
    88 * Author URI: http://ciaranmahoney.me/
     
    2929// Set the version of this plugin
    3030if( ! defined( 'POCKET_WP' ) ) {
    31   define( 'POCKET_WP', '0.4.1' );
     31  define( 'POCKET_WP', '0.4.2' );
    3232}
    3333
     
    366366
    367367                // Check for tags
    368                 if ($item['tags'] != ''){
     368                if (isset($item['tags'] )){
    369369                    $pwp_tags = $item['tags'];
    370370                } else {
     
    373373
    374374                array_push($pwp_links_output,
    375                     array($pwp_url, $pwp_title, $pwp_excerpt, $pwp_tags
    376                     )
     375                    array($pwp_url, $pwp_title, $pwp_excerpt, $pwp_tags)
    377376                );
    378377            }
     
    409408                // Display tag list if tag_list not set to no.
    410409                if(strtolower($tag_list) != 'no') {
    411                     $html[] = '<p class="pwp_tag_list">';
    412                     foreach($item[3] as $tag) {
    413                         $html[] = '<span class="pwp_tags">' . $tag['tag'] . '</span>';
    414                     }
    415                     $html[] ='</p>';
    416                 }
     410                    if($item[3] != ""){
     411                        $html[] = '<p class="pwp_tag_list">';
     412                        foreach($item[3] as $tag) {
     413                            $html[] = '<span class="pwp_tags">' . $tag['tag'] . '</span>';
     414                        }
     415                        $html[] ='</p>';
     416
     417                    } else {
     418                        $html[] = '<p class="pwp_tag_list"><span class="pwp_tags">untagged</span></p>';
     419                    }
     420                } else {
     421                    $html[] ='<p class="pwp_tag_list"></p>';
     422                }
    417423            }
    418424       
  • pocket-wp/trunk/readme.txt

    r1067446 r1067529  
    7171== Changelog ==
    7272
     73= 0.4.2 =
     74* Improved the way plugin handles untagged posts. It now shows "untagged" in the tag list instead of throwing an error. Tag list can be turned off by using tag_list="no"
     75
    7376= 0.4.1 =
    7477* Adding error checking on pocket feed retrieval.
Note: See TracChangeset for help on using the changeset viewer.