RE: Is this a valid PHP code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:xfsgpr@xxxxxxxxxxx] 
Sent: Sunday, September 23, 2012 10:09 PM
To: php-windows@xxxxxxxxxxxxx
Subject:  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



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux