'left',
"width" => '100%',
), $atts));
return ''.nrelate_related(true).'
';
}
add_shortcode('nrelate-related', 'nrelate_related_shortcode');
/**
* Register the widget.
*
* @uses register_widget() Registers individual widgets.
* @link http://codex.wordpress.org/WordPress_Widgets_Api
*
* @since 0.1
*/
// Temporarily disabled -- don't worry it's coming back
function nrelate_related_load_widget() {
//Load widget file.
require_once( 'related-widget.php' );
// Register widget.
register_widget( 'nrelate_Widget_Related' );
};
/**
* Primary function
*
* Gets options and passes to nrelate via Javascript
*
* @since 0.1
*/
function nrelate_related($opt=false) {
if (is_single()) {
// Assign options
$nrelate_related_options = get_option( 'nrelate_related_options' );
$post_title = urlencode(get_the_title($href));
$wp_root_nr = get_bloginfo( 'url' );
$wp_root_nr = str_replace(array('http://','https://'), '', $wp_root_nr);
$wp_root_nr = urlencode($wp_root_nr);
$markup = <<
EOD;
if ($opt){
return $markup;
}
else{
echo $markup;
}
}
};
?>