当前位置: 首页>>代码示例>>PHP>>正文


PHP wp_iframe函数代码示例

本文整理汇总了PHP中wp_iframe函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_iframe函数的具体用法?PHP wp_iframe怎么用?PHP wp_iframe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wp_iframe函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: pageIframe

    /**
     * Build HTML for page used on iframe by thickbox
     */
    function pageIframe()
    {
        global $body_id, $shortcode_tags;
        // Define this body for CSS
        $body_id = 'media-upload';
        // Add CSS for media style
        wp_enqueue_style('media');
        //wp_enqueue_script('ssm-main', SSM_URL . '/js/ssm-main.js', ('jquery') );
        // Send to editor ?
        if (isset($_GET['shortcode'])) {
            ?>
			<script type="text/javascript">
			/* <![CDATA[ */
			var win = window.dialogArguments || opener || parent || top;
			win.send_to_editor('<?php 
            echo $_GET['shortcode'];
            ?>
');
			/* ]]> */
			</script>
			<?php 
            die;
        }
        // Render list
        wp_iframe(array($this, 'form'));
        die;
    }
开发者ID:herewithme,项目名称:simple-shortcodes-manager,代码行数:30,代码来源:class.admin.post.php

示例3: media_upload_upload

 function media_upload_upload()
 {
     if (isset($_GET['tab']) && $_GET['tab'] == 'zip') {
         wp_iframe("media_upload_zip_content");
     } else {
         wp_iframe("media_upload_zip_form");
     }
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:8,代码来源:upload_handler.php

示例4: salsapress_form_button_iframe

function salsapress_form_button_iframe()
{
    wp_enqueue_script('SalsaPress', SALSAPRESS_BASE . 'utils/SalsaPress.js', array('jquery'), '1.0', true);
    wp_enqueue_style('SalsaPress_Admin', SALSAPRESS_BASE . 'admin/salsapress_admin.css', '', '0.5', 'all');
    wp_enqueue_script('SalsaPress_Admin', SALSAPRESS_BASE . 'admin/salsapress_admin.js', array('jquery'), '1.0', true);
    localize_scripts();
    remove_action('admin_enqueue_scripts', 'wp_auth_check_load');
    wp_iframe('salsapress_form_button_iframe_content');
    exit;
}
开发者ID:iCaspar,项目名称:SalsaPress,代码行数:10,代码来源:embed.php

示例5: add_imgbedtab_form

function add_imgbedtab_form()
{
    global $data;
    if ($_GET['tab'] == 'imgbedtab') {
        add_action('admin_enqueue_scripts', 'add_imgbed_scripts');
    }
    require IMGBED_PATH . '/media_imgbedtab_form.php';
    wp_iframe('media_imgbedtab_form');
    //media 关键字加载media的CSS
}
开发者ID:yakeing,项目名称:imgbed,代码行数:10,代码来源:imgbed.php

示例6: insert_media_upload

 function insert_media_upload()
 {
     global $wp_version;
     if ($wp_version < '2.6') {
         add_action('admin_head_middmedia_media_upload', 'media_admin_css');
     } else {
         wp_admin_css('media');
     }
     media_upload_header();
     return wp_iframe('middmedia_media_upload', $this);
 }
开发者ID:adamfranco,项目名称:middmedia-wordpressplugin,代码行数:11,代码来源:middmedia.php

示例7: sp_ev_media_upload_external_videos

function sp_ev_media_upload_external_videos()
{
    $errors = array();
    if (!empty($_POST)) {
        $return = media_upload_form_handler();
        if (is_string($return)) {
            return $return;
        }
        if (is_array($return)) {
            $errors = $return;
        }
    }
    return wp_iframe('media_upload_external_videos_form', $errors);
}
开发者ID:nowotny,项目名称:external-videos,代码行数:14,代码来源:ev-media-gallery.php

示例8: mediaUpload

 function mediaUpload()
 {
     $errors = array();
     if (!empty($_POST)) {
         $return = media_upload_form_handler();
         if (is_string($return)) {
             return $return;
         }
         if (is_array($return)) {
             $errors = $return;
         }
     }
     wp_iframe(array($this, 'mediaForm'), $errors);
 }
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:14,代码来源:class.MediaHandler.php

示例9: media_upload_gallery

 function media_upload_gallery()
 {
     $errors = array();
     if (!empty($_POST)) {
         $return = media_upload_form_handler();
         if (is_string($return)) {
             return $return;
         }
         if (is_array($return)) {
             $errors = $return;
         }
     }
     wp_enqueue_script('admin-gallery');
     return wp_iframe(array(&$this, 'media_upload_gallery_form'), $errors);
 }
开发者ID:par-orillonsoft,项目名称:creationOfSociety,代码行数:15,代码来源:init.php

示例10: 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

示例11: dt_a_portfolio_mu

function dt_a_portfolio_mu()
{
    $errors = array();
    if (!empty($_POST)) {
        $return = media_upload_form_handler();
        if (is_string($return)) {
            return $return;
        }
        if (is_array($return)) {
            $errors = $return;
        }
    }
    wp_enqueue_style('media');
    wp_enqueue_script('admin-gallery');
    return wp_iframe('dt_portfolio_media_form', $errors);
}
开发者ID:mnjit,项目名称:aa-global,代码行数:16,代码来源:actions.php

示例12: render_media_external_tab

 public static function render_media_external_tab()
 {
     $errors = null;
     if (!empty($_POST)) {
         $return = media_upload_form_handler();
         if (is_string($return)) {
             return $return;
         }
         if (is_array($return)) {
             $errors = $return;
         }
     }
     wp_enqueue_style('media');
     require_once dirname(__FILE__) . "/jwp6-media-external.php";
     return wp_iframe("jwp6_media_external_tab", $errors);
     //wp_redirect(JWP6_PLUGIN_URL . 'jwp6-media-external.php');
     //exit();
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:18,代码来源:jwp6-class-media.php

示例13: media_upload_social_video

function media_upload_social_video()
{
    if (isset($_POST['social_video_save'])) {
        //	http://www.prelovac.com/vladimir/improving-security-in-wordpress-plugins-using-nonces
        //	http://othersideofthepillow.com/tutorials/wordpress/plugins/admin-nonce/
        //	why we can't use our own nonce names i've no idea
        check_admin_referer('media-form');
        $errors = media_upload_social_video_handler();
        //			print_r($errors);
        //			exit;
        if ($errors) {
            return wp_iframe('media_upload_social_video_form', $errors);
        } else {
            return wp_iframe('media_upload_gallery', $errors);
        }
    } else {
        return wp_iframe('media_upload_social_video_form', $errors);
    }
}
开发者ID:mark2me,项目名称:pressform,代码行数:19,代码来源:is-socialvideo.php

示例14: 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

示例15: 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


注:本文中的wp_iframe函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。