Changeset 710


Ignore:
Timestamp:
03/20/2012 11:27:07 AM (14 months ago)
Author:
ofer
Message:

Support inserting widgets into post as shortcode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/transposh.php

    r698 r710  
    11921192        } 
    11931193 
     1194        if (isset($atts['widget'])) { 
     1195            ob_start(); 
     1196            $this->widget->widget(array('before_widget' => '', 'before_title' => '', 'after_widget' => '', 'after_title' => ''), array('title' => '', 'widget_file' => $atts['widget'])); 
     1197            $widgetcontent = ob_get_contents(); 
     1198            ob_end_clean(); 
     1199            return $widgetcontent; 
     1200        } 
     1201         
    11941202        if ($lang || $only_class || $nt_class) { 
    11951203            return '<span ' . $only_class . $nt_class . $lang . '>' . do_shortcode($content) . '</span>'; 
Note: See TracChangeset for help on using the changeset viewer.