在我将WP更新到最新版本之后,这发生在我的主题上。 网址为:http://www.movie-galaxy.com
注意:未定义的索引:第507行/home1/djandrei/public_html/movie-galaxy.com/wp-content/themes/DarkTheme/functions.php中的video_width
注意:未定义的索引:第508行/home1/djandrei/public_html/movie-galaxy.com/wp-content/themes/DarkTheme/functions.php中的video_height
警告:无法修改标头信息 - 已在/ home1 / djandrei中发送的标头(输出从/home1/djandrei/public_html/movie-galaxy.com/wp-content/themes/DarkTheme/functions.php:507开始)第2行/public_html/movie-galaxy.com/wp-admin/post.php
add_action('publish_post', 'ys_video_add_post_meta');
function ys_video_add_post_meta($post_ID) {
global $wpdb;
update_post_meta($post_ID, '_video_portal', $_POST["video_portal"]);
update_post_meta($post_ID, '_video_id', $_POST["video_id"]);
update_post_meta($post_ID, '_video_width', $_POST["video_width"]);
update_post_meta($post_ID, '_video_height', $_POST["video_height"]);
update_post_meta($post_ID, '_video_thumbnail', $_POST["video_thumbnail"]);
update_post_meta($post_ID, '_video_thumbnail_small', $_POST["video_thumbnail_small"]);
update_post_meta($post_ID, '_movie_featured', $_POST["movie_featured"]);
update_post_meta($post_ID, '_video_dvd_downurl', $_POST["video_dvd_downurl"]);
update_post_meta($post_ID, '_featured_prcture', $_POST["featured_prcture"]);
update_post_meta($post_ID, '_featured_prcture_small', $_POST["featured_prcture_small"]);
update_post_meta($post_ID, '_flv_url', $_POST["flv_url"]);
}
答案 0 :(得分:1)
检查您的POST数据是否已设置。
if(isset($_POST["action"]) && $_POST["action"] == "video_thumbnail_upload_submit") {