XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 23, 2010, 11:42:58 AM (14 years ago)
Author:
toemon
Message:

デフォルトテーマをWP3から導入されるカスタムメニュー対応にする Fixes #320
また、「ヘッダーの背景と文字の色」の編集に対応させる。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/images/header-img.php

    r1 r561  
    11<?php 
    22 
    3 $img = 'kubrickheader.jpg'; 
     3$img = 'xpressheader.jpg'; 
    44 
    55// If we don't have image processing support, redirect. 
    66if ( ! function_exists('imagecreatefromjpeg') ) 
    7         die(header("Location: kubrickheader.jpg")); 
     7        die(header("Location: xpressheader.jpg")); 
    88 
    99// Assign and validate the color values 
     
    3333// Get the background color, define the rectangle height 
    3434$white = imagecolorat( $im, 15, 15 ); 
    35 $h = 182; 
     35$h = 84; 
    3636 
    3737// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) ) 
     
    5151// Blank out the blue thing 
    5252for ( $i = 0; $i < $h; $i++ ) { 
    53         $x1 = 19; 
    54         $x2 = 740; 
    55         imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); 
     53        $x1 = 0; 
     54        $x2 = 800; 
     55        imageline( $im, $x1, $i, $x2, $i, $white ); 
    5656} 
    5757 
    5858// Draw a new color thing 
    5959for ( $i = 0; $i < $h; $i++ ) { 
    60         $x1 = 20; 
    61         $x2 = 739; 
     60        $x1 = 0; 
     61        $x2 = 800; 
    6262        $r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1; 
    6363        $g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1; 
    6464        $b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1; 
    6565        $color = imagecolorallocate( $im, $r, $g, $b ); 
    66         if ( array_key_exists($i, $corners) ) { 
    67                 imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); 
    68                 list ( $x1, $x2 ) = $corners[$i]; 
    69         } 
    70         imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color ); 
     66//      if ( array_key_exists($i, $corners) ) { 
     67//              imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white ); 
     68//              list ( $x1, $x2 ) = $corners[$i]; 
     69//      } 
     70        imageline( $im, $x1, $i, $x2, $i, $color ); 
    7171} 
    7272 
Note: See TracChangeset for help on using the changeset viewer.