diff --git a/functions.php b/functions.php index 17dd09ec..0112dc95 100755 --- a/functions.php +++ b/functions.php @@ -31,11 +31,17 @@ function twitter_card($photo, $title, $descrpition) { function custom_meta($post, $meta) { $output = ''; - $title = (isset($post->title_meta) && $post->title_meta != '') ? $post->title_meta : $meta['og:title']; + $title = (!empty($post->title_meta)) ? $post->title_meta + : (isset($meta['og:title'])) ? $meta['og:title'] + : '' ; - $description = (isset($post->description_meta) && $post->description_meta != '') ? $post->description_meta : $meta['og:description']; + $description = (!empty($post->description_meta)) ? $post->description_meta + : (isset($meta['og:description'])) ? $meta['og:description'] + : ''; - $image = (isset($post->image_meta) && $post->image_meta != '') ? $post->image_meta : $meta['og:image']; + $image = (!empty($post->image_meta)) ? $post->image_meta + : (isset($meta['og:image'])) ? $meta['og:image'] + : ''; // Description tags / og:description $output .= '' . PHP_EOL; diff --git a/index.php b/index.php index e69de29b..67c94a57 100644 --- a/index.php +++ b/index.php @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/setup/campaign/class.full-width-featured-video.php b/setup/campaign/class.full-width-featured-video.php index b1630e55..400dec62 100644 --- a/setup/campaign/class.full-width-featured-video.php +++ b/setup/campaign/class.full-width-featured-video.php @@ -38,11 +38,11 @@ function cv2_video_meta_box_callback() {

- - @@ -55,7 +55,7 @@ function cv2_video_meta_box_callback() { add_action('save_post', 'cv2_save_meta_box_page_details'); function cv2_save_meta_box_page_details() { global $post; - if (get_post_type($post) == 'page') { + if (get_post_type($post) == 'page' && isset($_POST['video-id'])) { update_post_meta($post->ID, 'video-id', $_POST['video-id']); } } diff --git a/setup/campaign/class.header-giving.php b/setup/campaign/class.header-giving.php index e69de29b..67c94a57 100644 --- a/setup/campaign/class.header-giving.php +++ b/setup/campaign/class.header-giving.php @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/setup/class.boundless-custom-meta.php b/setup/class.boundless-custom-meta.php index 53113a4b..95c0ea2e 100644 --- a/setup/class.boundless-custom-meta.php +++ b/setup/class.boundless-custom-meta.php @@ -92,7 +92,7 @@ function add_meta_fields($post) { if ($tag['id'] == 'image_meta') { $input = '

' . $tag['title'] . '

' . $tag['description'] . '


'; } else { - $input = '

' . $tag['title'] . '

' . $tag['description'] . '


'; + $input = '

' . $tag['title'] . '

' . $tag['description'] . '


'; } echo $input; } diff --git a/setup/class.url-meta-field.php b/setup/class.url-meta-field.php index 5aaf0963..c570bd8c 100755 --- a/setup/class.url-meta-field.php +++ b/setup/class.url-meta-field.php @@ -21,7 +21,7 @@ function source_url_meta_box($post) { function save_meta($post_id){ $post = get_post($post_id); - if ($post->post_type == 'post'){ + if ($post->post_type == 'post' && isset( $_POST['source_url'] ) ){ $source_url = $_POST['source_url']; update_post_meta($post_id, 'source_url', $source_url); }