Plugin Directory

Changeset 406503


Ignore:
Timestamp:
07/07/2011 10:15:48 PM (15 years ago)
Author:
Name.ly
Message:

Support for WP prior to version 3.0.0 (before function get_site_url was introduced).

Location:
links2tabs/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • links2tabs/trunk/links2tabs.php

    r405644 r406503  
    77Plugin URI: http://links2tabs.com/plugins/wordpress/
    88Description: In addition to link bundling services <a href="http://brief.ly/" target="_blank" ><em>Brief.ly</em></a>, <a href="http://links2.me/" target="_blank" ><em>Links2.Me</em></a>, <a href="http://many.at/" target="_blank" ><em>Many.at</em></a>, Links2Tabs plugin automatically generates the list of references at the bottom of each post and/or page and bundles them into handy links that open everything with one click. If you also want your visitors to open all recent items from your RSS feed with one click, consider installing Feed2Tabs plugin.
    9 Version: 0.0.1
     9Version: 0.0.2
    1010Author: Name.ly
    1111Author URI: http://name.ly/
     
    358358  } // end of if ( $links2tabs_options [ "min_number_of_links" ] >= $bundleindexbase + $current_link_in_current_bundle )
    359359
     360  // function get_site_url was not present in old versions of WP prior to 3.0.0
     361  if ( function_exists ( "get_site_url" ) ) {
     362    $site_url = get_site_url ();
     363  } elseif ( function_exists ( "site_url" ) ) {
     364    $site_url = site_url ();
     365  } else {
     366    $site_url = get_option( 'siteurl' );
     367  } // end of if ( function_exists ( "get_site_url" ) )
     368
    360369  // add the bundled refereces
    361370  if ( 1 == count ( $bundles ) ) {
     
    364373    $description = urlencode ( str_replace ( '%REF_IDS%', $bundlecaptions [ 1 ], links2tabs_parse_blog_shortcodes ( $links2tabs_options [ "description" ] ) ) );
    365374    $bundledlink = $links2tabs_options ["custom_api_base" ] . '?toc=' . $toc . ( "yes" != $links2tabs_options [ "open_in_tabs" ] ? '&menu=toconly' : '' ) . '&title=' . $title . '&description=' . $description . $bundles [1];
    366     $content .= '<a name="links2tabs"></a><div id="links2tabs" class="links2tabs"><p>' . ( $links2tabs_options [ "one_bundle_caption" ] ? $links2tabs_options [ "one_bundle_caption" ] . ' ' : '' ) . ' [<a href="' . $bundledlink . '"' . ( "_blank" == $links2tabs_options [ "target" ] ? ' target="_blank"' : '' ) . '>' . $bundlecaptions [ 1 ] . '</a>' . ']' . ( current_user_can ( "manage_options" ) ? ' [<a href="' . get_site_url () . '/wp-admin/options-general.php?page=links2tabs">' . __ ( 'Configure', 'links2tabs' ) . '</a>]' : '' ) . '</p></div>';
     375    $content .= '<a name="links2tabs"></a><div id="links2tabs" class="links2tabs"><p>' . ( $links2tabs_options [ "one_bundle_caption" ] ? $links2tabs_options [ "one_bundle_caption" ] . ' ' : '' ) . ' [<a href="' . $bundledlink . '"' . ( "_blank" == $links2tabs_options [ "target" ] ? ' target="_blank"' : '' ) . '>' . $bundlecaptions [ 1 ] . '</a>' . ']' . ( current_user_can ( "manage_options" ) ? ' [<a href="' . $site_url . '/wp-admin/options-general.php?page=links2tabs">' . __ ( 'Configure', 'links2tabs' ) . '</a>]' : '' ) . '</p></div>';
    367376  } elseif ( 1 < count ( $bundles ) ) {
    368377    $toc_basis = links2tabs_parse_blog_shortcodes ( $links2tabs_options [ "toc" ] ) ;
     
    379388    $content .= '</ul>';
    380389    if ( current_user_can ( "manage_options" ) ) {
    381       $content .= '<p>' . '[<a href="' . get_site_url () . '/wp-admin/options-general.php?page=links2tabs">' . __ ( 'Configure', 'links2tabs' ) . '</a>]' . '</p>';
     390      $content .= '<p>' . '[<a href="' . $site_url . '/wp-admin/options-general.php?page=links2tabs">' . __ ( 'Configure', 'links2tabs' ) . '</a>]' . '</p>';
    382391    } // end of if ( current_user_can ( "manage_options" ) )
    383392    $content .= '</div>';
  • links2tabs/trunk/readme.txt

    r405644 r406503  
    44Tags: frames, links, references, sites, windows
    55Requires at least: 2.8
    6 Tested up to: 3.1.4
    7 Stable tag: 0.1
     6Tested up to: 3.2
     7Stable tag: 0.0.2
    88License: GPLv2 or later
    99
     
    9999* Created and tested.
    100100
     101= 0.0.2 =
     102* Support for WP prior to version 3.0.0 (before function get_site_url was introduced).
     103
    101104
    102105
Note: See TracChangeset for help on using the changeset viewer.