當前位置: 首頁>>代碼示例>>PHP>>正文


PHP media_send_to_editor函數代碼示例

本文整理匯總了PHP中media_send_to_editor函數的典型用法代碼示例。如果您正苦於以下問題:PHP media_send_to_editor函數的具體用法?PHP media_send_to_editor怎麽用?PHP media_send_to_editor使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了media_send_to_editor函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: send_to_editor

 /**
  * If image is sucessfully uploaded, automatically close the editor 
  * and store the image URL in the image input
  * @param array $args the default args
  * @return array the original args, unmodified
  * @uses media_send_to_editor()
  * @uses send_to_editor() (javascript)
  */
 function send_to_editor($args)
 {
     global $wpdb;
     if (isset($GLOBALS['HTTP_POST_FILES']['async-upload'])) {
         if ($args['errors'] !== null) {
             return $args;
         }
         if (isset($_GET['attachment_id'])) {
             $id = $_GET['attachment_id'];
             //workaround for WP 3.2 non-flash upload
             //not ideal, but works for an edge case
         } else {
             //because we can't get the attachment ID at this point, try to pull it from the database
             //look for the most recent parent-less attachment with same title and mime-type
             $upload = $GLOBALS['HTTP_POST_FILES']['async-upload'];
             $title = substr($upload['name'], 0, strrpos($upload['name'], '.'));
             $id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_mime_type = '" . $upload['type'] . "' AND post_parent = '0' AND post_title = '{$title}' ORDER BY ID DESC LIMIT 1");
             //if for some reason we couldn't pull the ID, simply kick
             //the user will just have to click insert to close the dialog
             if (!$id) {
                 return $args;
             }
         }
         //rely on WordPress's internal function to output script tags and call send_to_editor()
         media_send_to_editor(wp_get_attachment_url($id));
     }
     return $args;
 }
開發者ID:Canyian,項目名稱:infinite-scroll,代碼行數:36,代碼來源:admin.php

示例2: media_upload_flag

function media_upload_flag()
{
    // Generate TinyMCE HTML output
    if (isset($_POST['send'])) {
        $keys = array_keys($_POST['send']);
        $send_id = (int) array_shift($keys);
        $image = $_POST['image'][$send_id];
        $alttext = stripslashes(htmlspecialchars($image['alttext'], ENT_QUOTES));
        $description = stripslashes(htmlspecialchars($image['description'], ENT_QUOTES));
        // here is no new line allowed
        $clean_description = preg_replace("/\n|\r\n|\r\$/", " ", $description);
        $img = flagdb::find_image($send_id);
        $class = "flag-singlepic flag-{$image['align']}";
        // Build output
        if ($image['size'] == "thumbnail") {
            $html = "<img src='{$image['thumb']}' alt='{$alttext}' class='{$class}' align='{$image['align']}' />";
        }
        // Wrap the link to the fullsize image around
        $html = "<a href='{$image['url']}' title='{$clean_description}'>{$html}</a>";
        if ($image['size'] == "full") {
            $html = "<img src='{$image['url']}' alt='{$alttext}' class='{$class}' align='{$image['align']}' />";
        }
        media_upload_flag_save_image();
        // Return it to TinyMCE
        media_send_to_editor($html);
    }
    // Save button
    if (isset($_POST['save'])) {
        media_upload_flag_save_image();
    }
    wp_iframe('media_upload_flag_form');
}
開發者ID:vadia007,項目名稱:acoustics,代碼行數:32,代碼來源:media-upload.php

示例3: wpgmappity_upload

function wpgmappity_upload()
{
    $map_meta_data = $_REQUEST['wpgmappity-submit-info'];
    //die(var_dump($_REQUEST));
    if ($_REQUEST['wpgmappity-edit-map'] == 'true') {
        $map_id = esc_attr($_REQUEST['wpgmappity-map-id']);
        $map_number = wpgmappity_update_meta_data($map_meta_data, $map_id);
    } else {
        $map_number = wpgmappity_insert_meta_data($map_meta_data);
    }
    $html = '<p>[wpgmappity id="' . $map_number . '"]</p>';
    return media_send_to_editor($html);
}
開發者ID:rodsilver83,項目名稱:victoria,代碼行數:13,代碼來源:wpgmappity-admin.php

示例4: insert_doc_into_post

 private function insert_doc_into_post($vars)
 {
     //strip blank values
     $vars['insert_existing'] = 0;
     $vars['insert_new'] = 0;
     $vars = array_filter($vars);
     $html = '[pdf ';
     foreach ($vars as $key => $val) {
         $html .= " {$key}=" . (is_numeric($val) ? $val : "'" . $val . "'");
     }
     $html .= ']';
     $html = apply_filters('media_send_to_editor', $html, $send_id, $attachment);
     return media_send_to_editor($html);
 }
開發者ID:ryanshoover,項目名稱:seufolios,代碼行數:14,代碼來源:pdf-viewer.php

示例5: s3video_playlist_media_manager

/**
 * 
 * Insert a playlist into the editor for a page or post through the media manager
 * 
 */
function s3video_playlist_media_manager()
{
    if (isset($_POST['insertPlaylistId']) && !empty($_POST['insertPlaylistId'])) {
        $insertHtml = "[S3_embed_playlist id='" . $_POST['insertPlaylistId'] . "']";
        media_send_to_editor($insertHtml);
        die;
    }
    $pluginSettings = s3_video_check_plugin_settings();
    // Load playlist management class
    require_once WP_PLUGIN_DIR . '/s3-video/includes/playlist_management.php';
    $playlistManagement = new s3_playlist_management();
    // Load all of the existing playlists
    $existingPlaylists = $playlistManagement->getAllPlaylists();
    require_once WP_PLUGIN_DIR . '/s3-video/views/playlist-management/media_manager_show_playlists.php';
}
開發者ID:nikitansk,項目名稱:devschool,代碼行數:20,代碼來源:playlist_management.php

示例6: media_upload_nextgen

function media_upload_nextgen()
{
    // Not in use
    $errors = false;
    // Generate TinyMCE HTML output
    if (isset($_POST['send'])) {
        $keys = array_keys($_POST['send']);
        $send_id = (int) array_shift($keys);
        $image = $_POST['image'][$send_id];
        $alttext = stripslashes(htmlspecialchars($image['alttext'], ENT_QUOTES));
        $description = stripslashes(htmlspecialchars($image['description'], ENT_QUOTES));
        // here is no new line allowed
        $clean_description = preg_replace("/\n|\r\n|\r\$/", " ", $description);
        $img = nggdb::find_image($send_id);
        $thumbcode = $img->get_thumbcode();
        $class = "ngg-singlepic ngg-{$image['align']}";
        // Create a shell displayed-gallery so we can inspect its settings
        $registry = C_Component_Registry::get_instance();
        $mapper = $registry->get_utility('I_Displayed_Gallery_Mapper');
        $factory = $registry->get_utility('I_Component_Factory');
        $args = array('display_type' => NGG_BASIC_SINGLEPIC);
        $displayed_gallery = $factory->create('displayed_gallery', $args, $mapper);
        $width = $displayed_gallery->display_settings['width'];
        $height = $displayed_gallery->display_settings['height'];
        // Build output
        if ($image['size'] == "thumbnail") {
            $html = "<img src='{$image['thumb']}' alt='{$alttext}' class='{$class}' />";
        } else {
            $html = '';
        }
        // Wrap the link to the fullsize image around
        $html = "<a {$thumbcode} href='{$image['url']}' title='{$clean_description}'>{$html}</a>";
        if ($image['size'] == "full") {
            $html = "<img src='{$image['url']}' alt='{$alttext}' class='{$class}' />";
        }
        if ($image['size'] == "singlepic") {
            $html = "[singlepic id={$send_id} w={$width} h={$height} float={$image['align']}]";
        }
        media_upload_nextgen_save_image();
        // Return it to TinyMCE
        return media_send_to_editor($html);
    }
    // Save button
    if (isset($_POST['save'])) {
        media_upload_nextgen_save_image();
    }
    return wp_iframe('media_upload_nextgen_form', $errors);
}
開發者ID:radscheit,項目名稱:unicorn,代碼行數:48,代碼來源:media-upload.php

示例7: render_media_embed_playlist_tab

 public static function render_media_embed_playlist_tab()
 {
     $no_video_error = false;
     if (isset($_POST[JWP6 . 'playlistid']) && $_POST[JWP6 . 'playlistid']) {
         $shortcode = new JWP6_Shortcode();
         media_send_to_editor($shortcode->shortcode());
         exit;
     } else {
         if (count($_POST)) {
             $no_video_error = true;
         }
     }
     wp_enqueue_style('media');
     JWP6_Media::enqueue_scripts();
     wp_enqueue_script('admin-gallery');
     require_once dirname(__FILE__) . "/jwp6-media-embed-playlist.php";
     return wp_iframe("jwp6_media_embed_playlist", $no_video_error);
 }
開發者ID:venamax,項目名稱:trixandtrax-cl,代碼行數:18,代碼來源:jwp6-class-media.php

示例8: send_to_editor

 function send_to_editor($args)
 {
     global $wpdb;
     if ($args['errors'] !== null) {
         return $args;
     }
     if (isset($_GET['attachment_id'])) {
         $id = $_GET['attachment_id'];
     } else {
         $upload = $GLOBALS['HTTP_POST_FILES']['async-upload'];
         $title = substr($upload['name'], 0, strrpos($upload['name'], '.'));
         $id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_type = 'attachment' AND post_mime_type = '" . $upload['type'] . "' AND post_parent = '0' AND post_title = '{$title}' ORDER BY ID DESC LIMIT 1");
         if (!$id) {
             return $args;
         }
     }
     media_send_to_editor(wp_get_attachment_url($id));
     return $args;
 }
開發者ID:jsd-aaron,項目名稱:keni-thomas,代碼行數:19,代碼來源:scroll-admin.php

示例9: media_upload_crystal_form_handler

function media_upload_crystal_form_handler()
{
    if (isset($_POST['insert-gallery'])) {
        return media_send_to_editor('[crystal-gallery]');
    }
    if (isset($_POST['send'])) {
        $keys = array_keys($_POST['send']);
        $send_id = (int) array_shift($keys);
        $attachment = $_POST['attachments'][$send_id];
        $html = $attachment['post_title'];
        if (!empty($attachment['url'])) {
            if (strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id']))) {
                $rel = " rel='attachment wp-att-" . attribute_escape($send_id) . "'";
            }
            $html = "<a href='{$attachment['url']}'{$rel}>{$html}</a>";
        }
        $html = apply_filters('media_send_to_editor', $html, $send_id, $attachment);
        return media_send_to_editor($html);
    }
    return wp_iframe('media_upload_crystal_form');
}
開發者ID:shell,項目名稱:Crystal-Gallery,代碼行數:21,代碼來源:crystal.php

示例10: s2sfu_media_upload_handler

/**
 * Modified from media_upload_file in WordPress 3.2.1
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @return unknown
 */
function s2sfu_media_upload_handler()
{
    add_filter('media_upload_tabs', '__return_false');
    add_filter('upload_dir', 's2sfu_upload_dir');
    $errors = array();
    $id = 0;
    if (isset($_POST['html-upload']) && !empty($_FILES)) {
        check_admin_referer('media-form');
        // Upload File button was clicked
        $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
        unset($_FILES);
        if (is_wp_error($id)) {
            $errors['upload_error'] = $id;
            $id = false;
        }
        //http://domain/?s2member_file_download=
        $filename = get_post_meta($id, '_wp_attached_file', true);
        $html = '<a href="' . site_url() . '/?s2member_file_download=' . $filename . '">' . $filename . '</a>';
        return media_send_to_editor($html);
    }
    return wp_iframe('media_upload_type_s2sfu', 's2sfu', $errors, $id);
}
開發者ID:hiryu85,項目名稱:s2member-secure-file-uploader,代碼行數:30,代碼來源:s2member-secure-file-uploader.php

示例11: media_upload_nextgen

function media_upload_nextgen()
{
    // Not in use
    $errors = false;
    // Generate TinyMCE HTML output
    if (isset($_POST['send'])) {
        $keys = array_keys($_POST['send']);
        $send_id = (int) array_shift($keys);
        $image = $_POST['image'][$send_id];
        $alttext = stripslashes(htmlspecialchars($image['alttext'], ENT_QUOTES));
        $description = stripslashes(htmlspecialchars($image['description'], ENT_QUOTES));
        // here is no new line allowed
        $clean_description = preg_replace("/\n|\r\n|\r\$/", " ", $description);
        $img = nggdb::find_image($send_id);
        $thumbcode = $img->get_thumbcode();
        $class = "ngg-singlepic ngg-{$image['align']}";
        // Build output
        if ($image['size'] == "thumbnail") {
            $html = "<img src='{$image['thumb']}' alt='{$alttext}' class='{$class}' />";
        }
        // Wrap the link to the fullsize image around
        $html = "<a {$thumbcode} href='{$image['url']}' title='{$clean_description}'>{$html}</a>";
        if ($image['size'] == "full") {
            $html = "<img src='{$image['url']}' alt='{$alttext}' class='{$class}' />";
        }
        if ($image['size'] == "singlepic") {
            $html = "[singlepic id={$send_id} w=320 h=240 float={$image['align']}]";
        }
        media_upload_nextgen_save_image();
        // Return it to TinyMCE
        return media_send_to_editor($html);
    }
    // Save button
    if (isset($_POST['save'])) {
        media_upload_nextgen_save_image();
    }
    return wp_iframe('media_upload_nextgen_form', $errors);
}
開發者ID:ahsaeldin,項目名稱:projects,代碼行數:38,代碼來源:media-upload.php

示例12: media_upload_file

function media_upload_file() {
    if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
        // Upload File button was clicked
        $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
        unset($_FILES);
        if ( is_wp_error($id) ) {
            $errors['upload_error'] = $id;
            $id = false;
        }
    }

    if ( !empty($_POST['insertonlybutton']) ) {
        $href = $_POST['insertonly']['href'];
        if ( !empty($href) && !strpos($href, '://') )
            $href = "http://$href";
        $title = attribute_escape($_POST['insertonly']['title']);
        if ( empty($title) )
            $title = basename($href);
        if ( !empty($title) && !empty($href) )
            $html = "<a href='$href' >$title</a>";
        return media_send_to_editor($html);
    }

    if ( !empty($_POST) ) {
        $return = media_upload_form_handler();

        if ( is_string($return) )
            return $return;
        if ( is_array($return) )
            $errors = $return;
    }

    if ( isset($_POST['save']) ) {
        $errors['upload_notice'] = __('Saved.');
        return media_upload_gallery();
    }

    return wp_iframe( 'media_upload_type_form', 'file', $errors, $id );
}
開發者ID:staylor,項目名稱:develop.svn.wordpress.org,代碼行數:39,代碼來源:media.php

示例13: wp_media_upload_handler

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @return mixed
 */
function wp_media_upload_handler()
{
    $errors = array();
    $id = 0;
    if (isset($_POST['html-upload']) && !empty($_FILES)) {
        check_admin_referer('media-form');
        // Upload File button was clicked
        $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
        unset($_FILES);
        if (is_wp_error($id)) {
            $errors['upload_error'] = $id;
            $id = false;
        }
    }
    if (!empty($_POST['insertonlybutton'])) {
        $src = $_POST['src'];
        if (!empty($src) && !strpos($src, '://')) {
            $src = "http://{$src}";
        }
        if (isset($_POST['media_type']) && 'image' != $_POST['media_type']) {
            $title = esc_html(wp_unslash($_POST['title']));
            if (empty($title)) {
                $title = esc_html(basename($src));
            }
            if ($title && $src) {
                $html = "<a href='" . esc_url($src) . "'>{$title}</a>";
            }
            $type = 'file';
            if (($ext = preg_replace('/^.+?\\.([^.]+)$/', '$1', $src)) && ($ext_type = wp_ext2type($ext)) && ('audio' == $ext_type || 'video' == $ext_type)) {
                $type = $ext_type;
            }
            $html = apply_filters($type . '_send_to_editor_url', $html, esc_url_raw($src), $title);
        } else {
            $align = '';
            $alt = esc_attr(wp_unslash($_POST['alt']));
            if (isset($_POST['align'])) {
                $align = esc_attr(wp_unslash($_POST['align']));
                $class = " class='align{$align}'";
            }
            if (!empty($src)) {
                $html = "<img src='" . esc_url($src) . "' alt='{$alt}'{$class} />";
            }
            $html = apply_filters('image_send_to_editor_url', $html, esc_url_raw($src), $alt, $align);
        }
        return media_send_to_editor($html);
    }
    if (!empty($_POST)) {
        $return = media_upload_form_handler();
        if (is_string($return)) {
            return $return;
        }
        if (is_array($return)) {
            $errors = $return;
        }
    }
    if (isset($_POST['save'])) {
        $errors['upload_notice'] = __('Saved.');
        return media_upload_gallery();
    }
    if (isset($_GET['tab']) && $_GET['tab'] == 'type_url') {
        $type = 'image';
        if (isset($_GET['type']) && in_array($_GET['type'], array('video', 'audio', 'file'))) {
            $type = $_GET['type'];
        }
        return wp_iframe('media_upload_type_url_form', $type, $errors, $id);
    }
    return wp_iframe('media_upload_type_form', 'image', $errors, $id);
}
開發者ID:jcsilkey,項目名稱:CodeReviewSecurityRepo,代碼行數:75,代碼來源:media.php

示例14: media_upload_flash

    function media_upload_flash() {
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
            // Upload File button was clicked
            $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
            unset($_FILES);
            if ( is_wp_error($id) ) {
                $errors['upload_error'] = $id;
                $id = false;
            }
        }

        if ( !empty($_POST['insertonlybutton']) ) {

            $src      = $_POST['insertonly']['src'];
            $title    = stripslashes( htmlspecialchars ($_POST['insertonly']['post_title'], ENT_QUOTES));
            $alt      = $_POST['insertonly']['post_content'];

            if ( !empty($src) && !strpos($src, '://') ) {
                $src = "http://$src";
            }

            // append any additional properties passed to the object.
            // I don't like that I'm doing the same thing here in two places
            // TODO: Need to make this so it only happens in one location.
            $extras   = '';
            if ( !empty($_POST['insertonly']['width']) && intval($_POST['insertonly']['width']) ) {
                $extras .= ' width="'.stripslashes( htmlspecialchars ($_POST['insertonly']['width'], ENT_QUOTES)).'"';
            }
            if ( !empty($_POST['insertonly']['height']) && intval($_POST['insertonly']['height']) ) {
                $extras .= ' height="'.stripslashes( htmlspecialchars ($_POST['insertonly']['height'], ENT_QUOTES)).'"';
            }
            if ( !empty($_POST['insertonly']['id']) ) {
                $extras .= ' id="'.stripslashes( htmlspecialchars ($_POST['insertonly']['id'], ENT_QUOTES)).'"';
            }
            if ( !empty($_POST['insertonly']['name']) ) {
                $extras .= ' name="'.stripslashes( htmlspecialchars ($_POST['insertonly']['name'], ENT_QUOTES)).'"';
            }
            if ( !empty($_POST['insertonly']['class']) ) {
                $extras .= ' class="'.stripslashes( htmlspecialchars ($_POST['insertonly']['class'], ENT_QUOTES)).'"';
            }
            if ( isset($_POST['insertonly']['align']) ) {
                $extras .= ' align="'.$_POST['insertonly']['align'].'"';
            }
            if ( isset($_POST['insertonly']['allowfullscreen']) ) {
                $extras .= ' allowfullscreen="'.$_POST['insertonly']['allowfullscreen'].'"';
            }
            if ( !empty($_POST['insertonly']['required_player_version']) ) {
                $extras .= ' required_player_version="'.stripslashes( htmlspecialchars ($_POST['insertonly']['required_player_version'], ENT_QUOTES)).'"';
            }

            if ( !empty($src) ) {
                $html  = '[swfobj src="'.$src.'"'.$extras.( ($alt != '') ? ']'.$alt.'[/swfobj]' : '] ');
            }

            return media_send_to_editor($html);
        }

        if ( !empty($_POST) ) {
            $return = media_upload_form_handler();

            if ( is_string($return) )
                return $return;
            if ( is_array($return) )
                $errors = $return;
        }

        if ( isset($_POST['save']) ) {
            $errors['upload_notice'] = __('Saved.');
        }

        if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' ) {
            return wp_iframe( 'media_upload_type_url_form', 'flash', $errors, $id );
        }

        return wp_iframe( 'media_upload_type_form', 'flash', $errors, $id );
    }
開發者ID:recetasdemama,項目名稱:wordpress,代碼行數:76,代碼來源:swfobj.php

示例15: media_upload_gmedia

function media_upload_gmedia()
{
    global $gmCore, $gmDB;
    add_action('admin_enqueue_scripts', 'gmedia_add_media_popup_enqueue_scripts');
    $action = $gmCore->_get('action');
    if (did_action('media_upload_gmedia_galleries')) {
        wp_iframe('gmedia_add_media_galleries');
    } elseif (did_action('media_upload_gmedia_terms')) {
        wp_iframe('gmedia_add_media_terms');
    } elseif (did_action('media_upload_gmedia_library')) {
        if ('upload' == $action && current_user_can('gmedia_upload')) {
            wp_iframe('gmedia_add_media_upload');
        } else {
            wp_iframe('gmedia_add_media_library');
        }
    }
    // Generate TinyMCE HTML output
    if (isset($_POST['gmedia_library_insert'])) {
        $id = $gmCore->_post('ID', 0);
        if ($gmedia = $gmDB->get_gmedia($id)) {
            $meta = $gmDB->get_metadata('gmedia', $gmedia->ID, '_metadata', true);
            $size = $gmCore->_post('size', 'web');
            $src = $gmCore->gm_get_media_image($gmedia, $size);
            $width = $meta[$size]['width'];
            $height = $meta[$size]['height'];
            $title = esc_attr($gmCore->_post('title', ''));
            $align = esc_attr($gmCore->_post('align', 'none'));
            $link = trim(esc_attr($gmCore->_post('link', '')));
            $caption = trim($gmCore->_post('description', ''));
            $html = "<img src='{$src}' width='{$width}' height='{$height}' alt='{$title}' title='{$title}' id='gmedia-image-{$id}' class='gmedia-singlepic align{$align}' />";
            if ($link) {
                $html = "<a href='{$link}'>{$html}</a>";
            }
            if ($caption) {
                $html = image_add_caption($html, false, $caption, $title, $align, $src, $size, $title);
            }
            ?>
            <script type="text/javascript">
                /* <![CDATA[ */
                var win = window.dialogArguments || opener || parent || top;
                jQuery('#__gm-uploader', win.document).css('display', 'none');
                /* ]]> */
            </script>
            <?php 
            // Return it to TinyMCE
            media_send_to_editor($html);
        }
    }
    if (isset($_POST['gmedia_gallery_insert'])) {
        $sc = $gmCore->_post('shortcode');
        ?>
        <script type="text/javascript">
            /* <![CDATA[ */
            var win = window.dialogArguments || opener || parent || top;
            jQuery('#__gm-uploader', win.document).css('display', 'none');
            /* ]]> */
        </script>
        <?php 
        // Return it to TinyMCE
        media_send_to_editor($sc);
    }
    if (isset($_POST['gmedia_term_insert'])) {
        $module_preset = $gmCore->_post('module_preset');
        $module = '';
        $preset = '';
        if (!empty($module_preset)) {
            if ($gmCore->is_digit($module_preset)) {
                $module_preset = $gmDB->get_term((int) $module_preset);
                $module = ' module=' . $module_preset->status;
                $preset = ' preset=' . $module_preset->term_id;
            } else {
                $module = ' module=' . $module_preset;
            }
        }
        $tax = $gmCore->_post('taxonomy');
        $term_id = $gmCore->_post('term_id');
        if ($tax && $term_id) {
            $tax = str_replace('gmedia_', '', $tax);
            $sc = "[gm {$tax}={$term_id}{$module}{$preset}]";
            ?>
            <script type="text/javascript">
                /* <![CDATA[ */
                var win = window.dialogArguments || opener || parent || top;
                jQuery('#__gm-uploader', win.document).css('display', 'none');
                /* ]]> */
            </script>
            <?php 
            // Return it to TinyMCE
            media_send_to_editor($sc);
        }
    }
}
開發者ID:pasyuk,項目名稱:grand-media,代碼行數:92,代碼來源:media-upload.php


注:本文中的media_send_to_editor函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。