Created
September 4, 2013 13:27
-
-
Save roboter/6436926 to your computer and use it in GitHub Desktop.
linkfeed.ru links wordpress plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: linkFeed | |
Plugin URI: | |
Description: linkFeed plugin | |
Version: 1.1.0 | |
Author: RobbyRoboter | |
Author URI: http://www.begemotik.ee | |
*/ | |
add_action('init', linkfeed_widget_register); | |
function linkfeed_widget_register() | |
{ | |
register_sidebar_widget('Link Feed', 'linkfeed_widget'); | |
} | |
function linkfeed_widget($args) | |
{ | |
global $wpdb; | |
extract($args); | |
$lc_charset = 'UTF-8'; // Набор символов для клиента | |
echo $before_widget; | |
echo $before_title; | |
echo 'Наши спонсоры:'; | |
echo $after_title; | |
echo '<ul><li>'; | |
define('LINKFEED_USER', 'ENTER YOUR ID HERE'); | |
require_once($_SERVER['DOCUMENT_ROOT'].'/'.LINKFEED_USER.'/linkfeed.php'); | |
$linkfeed = new LinkfeedClient(); | |
echo $linkfeed->return_links(); | |
echo '</li></ul>'; | |
echo $after_widget; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment