本文整理汇总了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');
}
示例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;
}
示例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");
}
}
示例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;
}
示例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
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
}
示例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);
}
示例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);
}