• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_iframe函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: add_filter

Support for image renaming, tested with WordPress MU.
*/
/**
 * Removes the media 'From URL' string. (http://wordpress.stackexchange.com/a/76290/70506)
 * @see wp-includes|media.php
 */
add_filter('media_view_strings', function ($strings) {
    unset($strings['insertFromUrlTitle']);
    return $strings;
});
add_filter('media_upload_tabs', function ($tabs) {
    $tabs['fp_grabfromurl'] = __('Save & Import from URL');
    return $tabs;
});
add_action('media_upload_fp_grabfromurl', function () {
    return wp_iframe('fpGrabFromURLIframe');
});
function fpUploadForm($headerMessage = '')
{
    echo '<form action="" method="post" id="image-form" class="media-upload-form type-form">';
    echo '<input type="hidden" name="post_id" value="' . $_REQUEST['post_id'] . '">';
    wp_nonce_field('media-form');
    echo '<div class="wrap media-embed" style="padding-left: 20px">' . $headerMessage . '<form>
	<table class="form-table"><tbody>
		<tr class="form-field form-required">
			<th scope="row" class="label">
			<span class="alignleft">Image URL</span>
			<span class="alignright"><abbr title="required" class="required">*</abbr></span>
			</th>
			<td class="field"><input name="grabfrom_url" type="url" required value="' . (isset($_POST['grabfrom_url']) ? $_POST['grabfrom_url'] : '') . '"></td>
		</tr>
开发者ID:basteln3rk,项目名称:save-import-image-from-url,代码行数:31,代码来源:save-import-image-from-url.php


示例17: popupReturn

 function popupReturn($viewFunc)
 {
     return wp_iframe(array($this->viewObj, 'popup_' . $viewFunc), $this->data);
 }
开发者ID:crazyyy,项目名称:octagram,代码行数:4,代码来源:back.php


示例18: media_menu_handle

 public function media_menu_handle()
 {
     return wp_iframe(array($this, 'media_html'));
 }
开发者ID:ryanshoover,项目名称:seufolios,代码行数:4,代码来源:pdf-viewer.php


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


示例20: displayThickboxInterface

 function displayThickboxInterface()
 {
     wp_enqueue_style('ecordia');
     wp_enqueue_script('ecordia');
     wp_enqueue_style('global');
     wp_enqueue_style('media');
     wp_iframe('ecordia_thickbox_include');
 }
开发者ID:simpsonjulian,项目名称:puppet-wordpress,代码行数:8,代码来源:scribe.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_image_add_srcset_and_sizes函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_id函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap