Skip to content

Commit

Permalink
mods to the custom-header.php, commenting out the customize.php error…
Browse files Browse the repository at this point in the history
… 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
Frumph committed Oct 16, 2013
1 parent e7b145c commit dcb2597
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 46 deletions.
9 changes: 4 additions & 5 deletions comments.php
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
7 changes: 7 additions & 0 deletions functions.php
@@ -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');
Expand Down
33 changes: 10 additions & 23 deletions functions/custom-header.php
@@ -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">
Expand Down
4 changes: 2 additions & 2 deletions functions/customize.php
Expand Up @@ -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');
}
Expand Down
25 changes: 11 additions & 14 deletions functions/facebook.php
Expand Up @@ -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')) {
Expand All @@ -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) {
Expand All @@ -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');

?>
6 changes: 4 additions & 2 deletions options/general.php
Expand Up @@ -289,7 +289,8 @@
</td>
</tr>
</table>

<?php
/*
<table class="widefat">
<thead>
<tr>
Expand All @@ -315,7 +316,8 @@
</td>
</tr>
</table>

*/
?>
<table class="widefat">
<thead>
<tr>
Expand Down

0 comments on commit dcb2597

Please sign in to comment.