Beispiel #1
0
 public static function get_upload_iframe_src($type, $tab, $args)
 {
     if (empty($tab)) {
         $tab = $type;
     }
     if (!is_array($args)) {
         $args = array();
     }
     if (empty($args['post_id']) && !empty($_REQUEST['post_id'])) {
         $args['post_id'] = $_REQUEST['post_id'];
     }
     add_filter("{$type}_upload_iframe_src", array(__CLASS__, 'add_upload_iframe_args'));
     self::$upload_iframe_args = array_merge(array('type' => $type, 'tab' => $tab), $args);
     $url = get_upload_iframe_src($type);
     self::$upload_iframe_args = null;
     remove_filter("{$type}_upload_iframe_src", array(__CLASS__, 'add_upload_iframe_args'));
     return $url;
 }