RE: Is this a valid PHP code?

"Jim MacDiarmid" <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
Yes,  looks valid to me.   Is it giving you an error somewhere?

Here is the code I was testing with:

<?php

function add_theme_support($support_type)
{
    $result = 0;
    return $result;
}

function apply_filters()
{
    $result = 0;
    return $result;
}

// This theme uses Featured Images (also known as post thumbnails) for
per-post/per-page Custom Header images
add_theme_support('post-thumbnails');

// Add support for custom headers.
$custom_header_support = array(
    'default-text-color' => '000',
    'width' => apply_filters( 'twentyeleven_header_image_width', 1000) ,
    'height' => apply_filters( 'twentyeleven_header_image_height', 180 ),
    'flex-height' => true,
    'random-default' => true,
    'wp-head-callback' => 'twentyeleven_header_style',
    'admin-head-callback' => 'twentyeleven_admin_header_style',
    'admin-preview-callback' => 'twentyeleven_admin_header_image',
);

echo "<pre>";
print_r($custom_header_support);
echo "</pre>";

    
?>



-----Original Message-----
From: Good Guy [mailto:[email protected]] 
Sent: Sunday, September 23, 2012 10:09 PM
To: [email protected]
Subject: [PHP-WIN] Is this a valid PHP code?


Can somebody tell me whether this is a valid PHP code?

<?php
// This theme uses Featured Images (also known as post thumbnails) for
per-post/per-page Custom Header images
	add_theme_support( 'post-thumbnails' );

	// Add support for custom headers.
	$custom_header_support = array(
		// The default header text color.
		'default-text-color' => '000',
		// The height and width of our custom header.
		'width' => apply_filters( 'twentyeleven_header_image_width',
1000 ),
		'height' => apply_filters(
'twentyeleven_header_image_height', 180 ),
		// Support flexible heights.
		'flex-height' => true,
		// Random image rotation by default.
		'random-default' => true,
		// Callback for styling the header.
		'wp-head-callback' => 'twentyeleven_header_style',
		// Callback for styling the header preview in the admin.
		'admin-head-callback' => 'twentyeleven_admin_header_style',
		// Callback used to display the header preview in the admin.
		'admin-preview-callback' =>
'twentyeleven_admin_header_image',
	);
?>

I am trying to change the default header image size (in wp THEME 2011) to a
height of 180px but it doesn't seem to work and I don't know what is causing
the problem.

THANKS.


--
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Email: http://mytaxsite.co.uk/contact-us


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.