Permalink
Browse files

mods to the custom-header.php, commenting out the customize.php error…

… code proliferator commented out the facebook stuff so it's no longer available but keep the other parts of it

Signed-off-by: Frumph <philip@frumph.net>
  • Loading branch information...
1 parent e7b145c commit dcb25979f7ac5e268fcbf70592bdbbcdf53b9157 @Frumph committed Oct 16, 2013
Showing with 38 additions and 46 deletions.
  1. +4 −5 comments.php
  2. +7 −0 functions.php
  3. +10 −23 functions/custom-header.php
  4. +2 −2 functions/customize.php
  5. +11 −14 functions/facebook.php
  6. +4 −2 options/general.php
View
@@ -66,10 +66,9 @@
</div>
<div class="clear"></div>
</div>
-<?php
- }
- } else {
-?>
+ <?php } ?>
+
+ <?php } else { ?>
<div class="commentnav">
<div class="commentnav-right"><?php next_comments_link(__('Next Comments &uarr;','comicpress')) ?></div>
<div class="commentnav-left"><?php previous_comments_link(__('&darr; Previous Comments','comicpress')) ?></div>
@@ -102,7 +101,7 @@
comment_form($args);
?>
</div>
-<?php } elseif (!comments_open() && (get_comments_number() > 0) && !is_page()) { ?>
+<?php } elseif (!comments_open() && (get_comments_number() > 0)) { ?>
<p class="closed-comments"><?php _e('Comments are closed.','comicpress'); ?></p>
<?php } ?>
</div>
View
@@ -1,5 +1,12 @@
<?php
+function comicpress_child_modify_post_link( $url, $bleah ) {
+ $url = str_replace('comic/', '', $url);
+ return $url;
+}
+
+add_filter( 'sharing_permalink', 'comicpress_child_modify_post_link', 10, 2 );
+
add_action('after_setup_theme', 'comicpress_setup');
add_action('wp_enqueue_scripts', 'comicpress_enqueue_theme_scripts');
add_action('widgets_init', 'comicpress_register_sidebars');
@@ -1,29 +1,16 @@
<?php
-$custom_header_args = array();
-
-add_theme_support( 'custom-header', array(
- 'flex-height' => true,
+$custom_header_args = array(
'flex-width' => true,
- // Header image default
- 'default-image' => false,
- // Header text display default
- 'header-text' => false,
- // Header text color default
- 'default-text-color' => '000',
- // Default Header image width (in pixels)
- 'width' => comicpress_themeinfo('custom_image_header_width'),
- // Default Header image height (in pixels)
- 'height' => comicpress_themeinfo('custom_image_header_height'),
- // Header image random rotation default
- 'random-default' => false,
- // Template header style callback
- 'wp-head-callback' => 'comicpress_header_style',
- // Admin header style callback
- 'admin-head-callback' => 'comicpress_admin_header_style',
- // Admin preview style callback
- 'admin-preview-callback' => 'comicpress_admin_header_style'
- ) );
+ 'width' => 980,
+ 'flex-height' => true,
+ 'height' => 120,
+ 'wp-head-callback' => 'comicpress_header_style',
+ 'admin-head-callback' => 'comicpress_admin_header_style',
+ 'admin-preview-callback' => 'comicpress_admin_header_style'
+ );
+
+add_theme_support( 'custom-header', $custom_header_args );
function comicpress_admin_header_style() { ?>
<style type="text/css">
View
@@ -142,9 +142,9 @@ function comicpress_customize_register( $wp_customize ) {
'type' => 'checkbox'
));
}
- foreach ($css_array as $setting) {
+/* foreach ($css_array as $setting) {
$wp_customize->get_setting($setting['slug'])->transport='postMessage';
- }
+ } */
if ($wp_customize->is_preview() && !is_admin())
add_action('wp_footer', 'comicpress_customize_preview');
}
View
@@ -18,12 +18,13 @@ function comicpress_facebook_thumbnail() {
global $post;
if (!empty($post) && $post->post_type == 'post') {
$post_image_id = get_post_thumbnail_id($post->ID);
- $thumbnail = wp_get_attachment_image_src( $post_image_id, 'large', false);
+ $thumbnail = wp_get_attachment_image_src( $post_image_id, 'thumbnail', false);
if (is_array($thumbnail)) {
- $thumbnail = reset($thumbnail);
- echo '<meta property="og:image" content="'.$thumbnail.'" />'."\r\n";
+ foreach ($thumbnail as $thumb) {
+ echo '<meta property="og:image" content="'.$thumb.'" />'."\r\n";
+ }
}
- }
+ }
}
if (!function_exists('comicpress_add_facebook_meta')) {
@@ -35,24 +36,22 @@ function comicpress_add_facebook_meta() {
} else {
echo '<meta property="og:url" content="'.home_url().'" />'."\r\n";
}
- echo '<meta property="og:site_name" content="'.get_bloginfo('name').'" />'."\r\n";
+ echo '<meta property="og:site_name" content="'.strip_tags(get_bloginfo('name')).'" />'."\r\n";
echo '<meta property="og:type" content="article" />'."\r\n";
if (is_single()) {
- echo '<meta property="og:title" content="'.get_the_title().'" />'."\r\n";
+ echo '<meta property="og:title" content="'.strip_tags(get_the_title()).'" />'."\r\n";
}
if (!is_front_page()) {
$quick_excerpt = esc_attr(get_the_excerpt());
// $quick_excerpt = str_replace("\r\n", " ", $quick_excerpt);
- echo '<meta property="og:description" content="'.$quick_excerpt.'" />'."\r\n";
+ echo '<meta property="og:description" content="'.strip_tags($quick_excerpt).'" />'."\r\n";
} else {
- echo '<meta property="og:description" content="'.get_bloginfo('description').'" />'."\r\n";
+ echo '<meta property="og:description" content="'.strip_tags(get_bloginfo('description')).'" />'."\r\n";
}
}
}
-
-if (comicpress_themeinfo('facebook_meta'))
- add_action('wp_head', 'comicpress_add_facebook_meta');
+// if (comicpress_themeinfo('facebook_meta')) add_action('wp_head', 'comicpress_add_facebook_meta');
if (!function_exists('comicpress_display_facebook_like')) {
function comicpress_display_facebook_like($content) {
@@ -64,7 +63,5 @@ function comicpress_display_facebook_like($content) {
}
}
-if (comicpress_themeinfo('facebook_like_blog_post'))
- add_action('the_content', 'comicpress_display_facebook_like');
+// if (comicpress_themeinfo('facebook_like_blog_post')) add_action('the_content', 'comicpress_display_facebook_like');
-?>
View
@@ -289,7 +289,8 @@
</td>
</tr>
</table>
-
+<?php
+/*
<table class="widefat">
<thead>
<tr>
@@ -315,7 +316,8 @@
</td>
</tr>
</table>
-
+*/
+?>
<table class="widefat">
<thead>
<tr>

0 comments on commit dcb2597

Please sign in to comment.