Plugin Directory

Changeset 574635


Ignore:
Timestamp:
07/19/2012 02:02:31 PM (14 years ago)
Author:
nickpowers
Message:

patch to fix shortcode access issue

Location:
social-autho-bio/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • social-autho-bio/trunk/readme.txt

    r564777 r574635  
    55Requires at least: 2.9
    66Tested up to: 3.4.1
    7 Stable tag: 2.2
     7Stable tag: 2.3
    88License: GPLv2
    99
     
    1414
    1515= Examples =
    16 [Social Author Bio Main Site](http://nickpowers.info/wordpress-plugins/social-author-bio/)
    17 [Social Author Bio Example](http://www.elirose.com/)
     16*   [Social Author Bio Main Site](http://nickpowers.info/wordpress-plugins/social-author-bio/)
     17*   [Social Author Bio Example](http://www.elirose.com/)
    1818
    1919= Built in Social Icons =
     
    9696Add code like below to your theme template files:
    9797
    98 [?php $socialauthor = do_shortcode('[social-bio]'); echo $socialauthor; ?]
     98[?php echo do_shortcode('[social-bio]'); ?]
    9999(Replace the first and last []'s with normal html greater/less than signs).
    100100
     
    103103Yes, since v2.1 you can use the following code to retrieve the Social Icons (Images with links)
    104104
    105 $icons = apply_filters('social_author_icons', $ID);
     105$icons = apply_filters('social_author_icons', $ID); echo $icons;
    106106
    107107where $ID is the ID of the user whos Social Icons you want to display
     
    115115
    116116== Changelog ==
     117
     118= 2.3 =
     119* Fixed bug where users who had disabled Social Author Bio in their profile were still being displayed via shortcode
    117120
    118121= 2.2 =
  • social-autho-bio/trunk/social_author_bio.php

    r564326 r574635  
    55Description: Social Author Bio adds bio box on posts with social icons
    66Author: Nick Powers
    7 Version: 2.2
     7Version: 2.3
    88Author URI: http://www.nickpowers.info
    99*/
     
    7070        // Initialize variables
    7171        $output = '';
     72        $id = get_the_author_meta('ID');
     73
     74        if ( !empty($atts['id']) ) {
     75            $id = $atts['id'];
     76        }
    7277
    7378        // Get options
     
    7580
    7681        // Display shortcode with current page/post author
    77         if ($options["shortcode"] && empty($atts['id'])) {
     82        if ($options["shortcode"] && empty($atts['id']) && !get_the_author_meta("social_bio_status")) {
    7883   
    7984            $output = $this->display(get_the_author_meta('ID'));
     
    8186        }
    8287        // Display shortcode with specified ID
    83         elseif ($options["shortcode"]){
     88        elseif ($options["shortcode"] && !get_the_author_meta("social_bio_status", $id)){
    8489            $output = $this->display($atts['id']);
    8590        }
     
    924929
    925930    function social_icons($ID) {
     931        // Init Variables
     932        $author_socials = '';
    926933
    927934
Note: See TracChangeset for help on using the changeset viewer.