|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////" u7 ?- m0 m9 Y$ L _) B# _
// Theme Option: n! p. Z9 W* L. ?( A' c
//////////////////////////////////////////////////////////////////////////////// Y+ v) e* C6 F" m1 E! }
' @9 ^/ \. ], Q7 _- [$themename = "Zenx";6 @! x( `0 l6 b# D
$shortname = str_replace(' ', '_', strtolower($themename));/ ?4 w* ^; B- p; y5 F
- t1 A& Q5 a7 T5 k! c% I8 Vfunction get_theme_option($option)* Q; S. F6 h9 i( n. {3 O8 D8 x
{. k' h" f& h' _) q5 z
global $shortname;# H. F6 b; Z$ d/ a
return stripslashes(get_option($shortname . '_' . $option));3 q- f* v6 _+ }1 |# Q8 B9 p( `
}2 i9 ]' ~' ?! U+ w: b _! k6 V
9 z l- d! z* y0 `0 |+ K
function get_theme_settings($option)
9 |8 ]0 |6 } v{+ i0 G3 S5 s2 A; ^
return stripslashes(get_option($option));' \- ^4 ?5 W. N( W3 @- |
}$ l G, O; {; c$ t2 ?. m) f
$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC"); K( }/ Y. `* f ~! a! s
$wp_getcat = array();/ r5 w$ u0 K9 |1 ~
foreach ($wp_dropdown_rd_admin as $category_list) {
3 l) V' ^' I* S6 E$wp_getcat[$category_list->term_id] = $category_list->name;
$ ?# G/ z/ y f7 g- _}: w; Z. o1 E- A$ S( E, P
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");8 s2 b' r. V" `. U. @+ q: H2 A& s7 C
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
. s/ ~- u; u0 R; w. L) Q" x$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
% E# {1 C8 x; o- J2 R6 ^: s) [$ }, W$ C* W
$options = array (
& v w( H0 T' M, p- [; S0 K' a ^" Q. n# L& \
6 z0 t9 j, L# o& c array( "name" => "Blog Header Settings",
2 ^% j+ n! r& r9 C6 w% a4 U% g "type" => "heading",) Y8 O: K+ F! }+ t/ p# Y
),
# I6 O7 [( l: n% T; ^( s- n- b1 y
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",9 E2 O2 |9 `7 f" h/ [
"id" => $shortname."_header_logo_activate",! B, t5 F3 n7 Q! l; E
"type" => "select",6 z3 q: V4 g( Q: [9 T# s8 h
"std" => "No",
" I+ R9 V/ v# V; w j, N( ] "options" => array("No", "Yes")),
P1 v' D7 I5 X! w& S1 d# |+ a J% w) }, J ^# R# R- N* y
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
3 t$ C: n) P" o7 c( e "id" => $shortname."_logo_url",3 w O, f. ~9 Y0 G$ Y
"type" => "text",% \& P/ g& ?/ ]9 p' _3 @. d
"box" => "social",
+ z6 w! U; P3 A* o6 {" R "std" => "",6 X# {8 W' w- {. i5 V4 R0 [
),
/ Q$ o8 F" F, K
3 D D4 }, i3 A( n/ |) ] array( "name" => "Insert Header Banner HTML Code (Header)6 i$ W* ?7 r% b" Y
<br /><em>*Recommended Size 468 x 60</em>
% s5 S7 t% q- S+ r H <br /><em>*leave blank if not use</em>",# {4 v9 `5 |* B; r& ?# {
"id" => $shortname."_header_banner",
1 O. s+ [/ b W q "type" => "textarea", A! _9 p7 n! k2 ?. D/ T% m7 C6 z& ^
"std" => "",: i/ {8 [* m! i
), u8 c$ n: y) [! C
2 e" R& \( e) Z' e# ~
array( "name" => "</div></div>",
9 v' E# B+ D& @# @; W "type" => "close",
; |8 D* d6 E3 y% b" Y7 r ),! t8 m2 c+ u4 H
& E$ S6 X0 k6 d: v5 l) b+ S' L$ I+ A& x) m1 ?3 H9 s+ J7 i
array( "name" => "Header Navigation Settings",
3 E5 |! B% I$ |$ C$ J "type" => "heading",
, \" G- x% h/ _ ),
, F. e3 D- W8 ^! S
3 v7 q: M* i& }0 f) R2 v array( "name" => "Insert Page ID To Exclude On Header Navigation<br />7 L2 b+ J0 F5 Y7 i1 B6 U
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
# l+ _0 _' ]) C, p <em>*Enter the page post ID number only</em><br />
" x8 [+ q( s1 d0 n/ p% ] <em>*separate by comma</em><br />
* H" R" i: S o( w% [ <em>*Exclude pages which you don't want to show on the header navigation</em>",
! t0 q2 o7 T( P+ F2 ]" V+ X "id" => $shortname."_header_page_navigation",
! s- E- `0 ~% r! m "type" => "text",
! v( R4 }$ h5 Q "std" => "",
& Y0 b2 N9 F& D" R6 \# s ),6 h7 u* d* H6 W" m" v) c+ s6 Z
4 t D8 V$ ]5 c array( "name" => "</div></div>",
6 R- C3 P9 O$ X- P3 R8 E( j' \- s "type" => "close",
5 r- f! e7 P# s: M; f1 s% s: e ),. G3 d/ T6 d5 w% J" d. {# {9 m
$ x7 v- @: H. s5 D9 q2 _+ n
$ L7 Z( t8 C" l( l y array( "name" => "Post Auto Thumbnails Settings",4 n4 _4 z* T; _, p; X
"type" => "heading",
) [# {1 c5 H7 Q ), N- z7 t. L/ J$ ^% H
1 S9 x+ f( o+ k3 G; j: T! d' M
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 F* s" B- U- _5 b, \& k3 a h "id" => $shortname."_timthumb_activate",
~: @6 ?. M1 C( l/ t2 t5 }. r "type" => "select",
2 c- A/ B* r3 _$ h' W# @ "std" => "No",! u% @' H, h6 I9 A& t+ d
"options" => array("No", "Yes")),% I: }' }) v4 K& y8 I) u* v
5 E" M- b L L9 Z1 k3 F/ _5 n array( "name" => "If Timthumb is enabled, Please choose its cropping method",7 ^7 s4 g3 Q# L; T1 g- F9 e! @
"id" => $shortname."_timthumb_cropping",
4 y% I& i7 W% m3 d" a "type" => "select",
# B/ u4 m/ C( z9 M0 m9 H "std" => "",9 z6 A. T: D/ J, g
"options" => $crop_position),
! `% R$ y8 R7 M( I6 q' e# o; |4 Y" } N* q! d( M B5 M; V
array( "name" => "Insert Width Of Thumbnail Image<br />
( t9 r# S+ P: \& o) O# ]# S <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />9 {* W. ^3 a6 t$ N% z J
<em>*Leave Blank To Use Default: 250</em><br />",
. ?) @+ Y9 \- @4 A! B( k; a0 y "id" => $shortname."_thumb_width",5 H6 t2 Z4 \- \ `8 f* _
"type" => "text",9 l6 i7 U1 G# q! _: n
"std" => "",3 k% U6 @2 n4 Y* f* o
),
. R: q3 h+ a7 G! Y6 U0 u/ c1 y8 Z& f9 X: Y6 }7 y
array( "name" => "Insert Height Of Thumbnail Image<br />
( X% ~1 g3 A* U, |. J W7 V H1 m <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />7 F( u9 b9 e. C! ~% M# ^# l
<em>*Leave Blank To Use Default: 200</em><br />",
7 P# a! E. ] e6 I j' X "id" => $shortname."_thumb_height",
! B1 z! T1 `8 l6 S "type" => "text",
; a! v- J' ~7 \2 L8 V/ H "std" => "",
# E% m8 |* k+ t: Q ),
% Q. Q1 Y6 H7 ]" c( B" Q* u
+ @' V3 ]7 s6 _; ?1 ] array( "name" => "</div></div>",
. c8 l2 h( x0 N7 _ "type" => "close"," y" F8 ` I: r) w
),. i! l/ g& J6 s5 O$ a
5 D+ j. ^, E! _2 b$ ^
array( "name" => "Featured Content Slider Settings",
~" _ _6 e# g7 Y" I* I "type" => "heading",
- y2 U: b% W2 F4 }3 U ),& T& j1 a+ J% s H9 g y2 C6 D8 g
; |& j( D# \8 U- d/ o% | array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",( Y$ }9 L. s/ z( ]4 M+ g
"id" => $shortname."_featured_activate",& P; x1 C8 r2 F
"type" => "select",, h9 B8 a& r% n4 {0 W7 o/ R: ]
"std" => "No",
6 M$ C0 c% t; L; i- N& l "options" => array("No", "Yes")),; u- U1 {$ M, Y& S
/ g- k" o5 S ]# q7 z3 R/ |
) d3 y* g% h: m/ ? array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
% m: l) X. z+ `1 ^( D "id" => $shortname."_featured_category",
Q; ~! C' ~0 H- J+ b8 a "type" => "select",
; ?5 d* {- p& D3 I# O0 D: P" ]) w( C "std" => "Choose a category:",
" g7 G) g& i G8 N' ] "options" => $wp_getcat),# f& m0 X: v5 c7 [- G
# V6 u: R! d+ U2 v/ w. ^- e8 u9 @ array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",# Z* x5 D- ~ d5 H
"id" => $shortname."_featured_number",
& Y- z7 F: ~9 F+ E "type" => "select",
! F/ n8 X0 `- {2 R+ V) c" ?4 Q "std" => "Number of post:",
( N9 d6 s! D4 n j0 K "options" => $number_entries),
- b/ P$ A- m1 y6 J4 V: O* _
& J2 M3 s3 f7 F) b1 k8 X array( "name" => "</div></div>",
' \4 t- W, @' J1 @! L "type" => "close",
& Z4 M1 R: X3 O ),
+ N. K- j2 @/ g! @1 s. A- A
" ^1 T9 e1 z6 o s8 O% h( P array( "name" => "Featured Category Settings", ?, Y/ |% G. A
"type" => "heading",
" @( }6 g) o% I- v ),7 q; ~" I! ]/ N9 X0 N' H0 s6 e
* p; \" ^) Z7 |/ {* `, }7 I array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",( w, A5 ?0 q5 h C% W* G
"id" => $shortname."_featured_category_activate",; p# I5 H6 p, o/ F
"type" => "select",
7 A7 j* H* P4 a- L) A "std" => "No",- t" p7 B \ P7 } l$ G
"options" => array("No", "Yes")),
2 D! a! n( A. c# _
* m4 J( |$ l5 V. d1 Q array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",& m9 G; L: o6 ^' ~7 w4 D
"id" => $shortname."_featured_category_id1",$ K: Z$ k" b" g3 K ^
"type" => "select",
+ G2 N( U! V- Z "std" => "Choose a category:",
: N9 ]' p9 J9 l2 { "options" => $wp_getcat),
9 d& f2 p7 K2 e: _ 1 X- M' q2 H- P7 B
array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
$ F- s8 _! e+ d7 B3 q8 s, J "id" => $shortname."_featured_number1",
! d! {( m9 w3 g: g8 w# T "type" => "select",
* {* d# d& h0 m" h- n; b1 k "std" => "Number of post:",) \2 R, @3 F' Y: X! A; U+ R8 s
"options" => $number_entries),
' t7 R2 G0 Z9 [4 U j 2 N8 o c- E4 Q% ]( ^& e% @1 X
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",! v( ?4 n8 l! [7 W h, V
"id" => $shortname."_featured_category_id2",4 W' O' W; ?8 `* A0 J ]7 s
"type" => "select",
/ [- `5 j9 ~/ I8 `/ h, r "std" => "Choose a category:",
# o% G6 B* U% o' } O. |" w "options" => $wp_getcat),
3 ^# a! Y. B1 M0 w8 s ' b$ |# v% Y) e& f/ w- q7 \0 T9 k& `" ?
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",( f) L9 q( u0 Q7 {3 y+ r! K: k: t
"id" => $shortname."_featured_number2",# x/ f+ O9 k3 m2 i0 x- n! O0 ^
"type" => "select",
* B0 y( _; r* ?8 Q. o "std" => "Number of post:",
+ {" u1 m2 Y/ G# U( i: [ "options" => $number_entries),6 O( j; S6 \4 Y9 d
- I0 [3 I4 I/ R/ x2 V- `: V+ M1 h ) X' A; {. B* R. J
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",1 Z# t2 g- H' W2 {$ _
"id" => $shortname."_featured_category_id3",9 Z# ?2 C2 c5 [ w+ S# z, w
"type" => "select",6 X' l5 B; h; E9 z1 g
"std" => "Choose a category:",9 r! O @; ?1 n) l
"options" => $wp_getcat),5 l u1 O- q5 d6 o
2 G- o* q- g: Y array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",0 ?; E; g/ I4 D' p- d; @5 X9 {
"id" => $shortname."_featured_number3",
2 H0 P/ }0 Q+ Y4 e8 Q) t; ?6 D+ K1 Q "type" => "select",: U$ w5 f4 \- H, z
"std" => "Number of post:",
7 Z+ R' H& V6 p- {6 M( n "options" => $number_entries),; f9 ~' g/ d. _9 r% V3 u" k# n
0 c- {& b$ k: e+ `! u/ p# D- F* x) `7 ~# H
array( "name" => "</div></div>",
+ F' M p( p: ] H. N# s "type" => "close",# P& b% O) E3 C4 R7 }) w& P9 G
),, N+ W6 Q" b4 r8 R2 k
2 i) Z: @1 [0 I9 H# [2 p! [
/ W- Z: D2 O0 k5 o7 k0 [! i array( "name" => "Google Adsense & Analytics Settings",, y. k7 I1 [; Z
"type" => "heading",
" Y# E; }8 S3 A) Q( F# p7 i# y ),
G$ x1 r0 W/ d2 n1 Z: ^5 ?, H. _$ t( K" T. a
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
0 P# k" n: b% ]4 ?# z+ W "id" => $shortname."_adsense_loop_activate",* G8 c" m3 a- p. e8 @
"type" => "select",
5 V/ p- O+ ]1 `" Y% b& | "std" => "Disable",1 b k# Z& H: K- l' v7 f8 M
"options" => array("Disable", "Enable")),- n( W+ h% l7 ^1 G; O# W
( f/ E* F) [. H4 u5 B h3 O' @4 C array( "name" => "Insert Google Adsense Code For Loops Here<br />0 q5 n6 P" W; C9 h
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
3 P4 P8 I5 [2 e3 | "id" => $shortname."_adsense_loop",! E/ I, z( ?. E& Q* N" u
"type" => "textarea",$ j% C0 W- _* M C! ^
"std" => "",
* N2 P; ?) t4 C3 r7 `4 r! B ),
/ J& R+ x7 T8 I( d1 v2 x4 Q
/ T0 Q# t9 k) w array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",# J, f; X1 D& Y( ~9 W
"id" => $shortname."_adsense_single_activate",& d7 V r3 x6 s+ S
"type" => "select",4 h' K& q% L1 L- f) T) J! R F
"std" => "Disable",
5 E0 R7 \ k. i# A# r5 E, H5 K "options" => array("Disable", "Enable"))," a1 x J6 h& l w/ q" f
0 ~& G" K' F7 P! h/ T array( "name" => "Insert Google Adsense Code For Single Page Here<br />: ^9 _, F/ p( k1 ?) _! J
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
6 h7 C' S! V+ N. w- W "id" => $shortname."_adsense_single",
6 G( Q) A; v2 z "type" => "textarea",
$ z& C, R4 p* j# p- r+ m3 I "std" => "",
; j8 a; f! q6 q ),. b! H8 {- P! v, q1 r1 C% M) C8 n8 J. @
4 {! g1 H, \: ]+ i
* s* r- [, v( v; w7 G( z
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
9 z$ n0 g/ d" U8 J8 t& ]4 U "id" => $shortname."_google_analytics",
. O) \$ C9 N0 y; P+ y+ I$ A7 X "type" => "textarea",, h- D2 }% _1 C! `5 z
"std" => "",* H" Y) f6 T' Z) Z; S! d
),4 E: S( T& z6 v: C0 w
2 n" b2 l3 ~# Q" _
array( "name" => "</div></div>",! i! y; e* P& W* b( l9 |; l+ F
"type" => "close",$ `; D2 N& n2 C, ~+ z; x! E
),
1 }/ c7 r: n: a0 A. H) { ; f% |9 ^+ o5 q9 i8 n' x
$ x$ i+ F: }4 |; X. O' y" f
array( "name" => "AddThis Social Bookmarking Settings",3 P1 Y: C: z6 O1 U, b$ J4 Q
"type" => "heading",
% z) v9 U- H0 A+ p. K ),5 N2 r& j2 Q; m/ I
* e4 ^* n4 m3 R4 f9 i! o array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
1 m) {) M: i! w: R5 N! i2 N <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",! B O# p7 h" J" x |
"id" => $shortname."_addthis",9 M( h" S* o$ q; O5 ?, e" j& I
"type" => "text",
9 E+ F% w' s% P5 K: u5 x, h "box" => "social",+ r" D; {* X1 \# M/ [7 [
"std" => "",
4 c& e" a8 ~) Y: E; @ ),* T8 l+ j5 v0 I8 o4 y. ^
1 }( k0 _& l+ q2 Y& } array( "name" => "</div></div>",2 Q" W0 z( d* u
"type" => "close",5 T& \- F! z/ l: A
),5 e' p- C" `5 C& h( }4 i
{# _7 }& e( {7 w) J `/ W8 Q% A; N s5 K
: r5 {4 k0 P& i! ?0 D6 m7 w array( "name" => "YouTube Video Settings",& @ r5 u! S6 f9 n! r
"type" => "heading",, e( F& C1 o+ l7 r
),
" g+ _4 E/ F( k& X- o( p
- J" d" e4 i1 G$ y" a, s array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
' x7 s: K8 p& D6 b "id" => $shortname."_emvideo_activate",5 @3 F; L9 R4 ]0 d; i1 z+ k% S
"type" => "select",+ B3 U& Z8 q1 C0 [3 k
"std" => "No",
2 G( X2 y2 B1 O6 R" f "options" => array("No", "Yes")),9 z6 G: G% [5 s1 G; E6 H
[6 @4 l7 v5 }& R array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",
! V* ?( y; ?3 O+ K }: w( [( a "id" => $shortname."_emvideo",: t3 V- y! y3 H+ \
"std" => "",/ m, F# b! ^; [2 W# w
"type" => "text"),6 ?$ _7 Y. R! S A6 g3 r: K
. H" H7 o# I& I
array( "name" => "</div></div>",
' g' N. ]7 M1 h5 M! Y8 L& Y- y "type" => "close",+ j9 ~, g( C; i8 c Q3 r$ S" V% X2 C- f" a" }
),
/ m4 Q2 P% f4 T1 M% H& k3 x1 C
; ^& `& O: C% W# r array( "name" => "Twitter Settings",0 Y/ U4 ?) U* @) Y
"type" => "heading",* y* P- I5 p" w2 j( z/ Y
),2 O; }% y' V& d- o( ~6 T
5 \3 E* v4 S) H( l' A: C array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",) X9 a% a$ t9 T, o( i/ t" d) y
"id" => $shortname."_twitter_activate",) h1 k& \/ G6 X) ^4 @3 n/ z' I1 n
"type" => "select",
7 a6 l7 u5 Z7 t; v "std" => "No",+ h' J" n0 V; R/ i! E: ?0 c/ s
"options" => array("No", "Yes")),
6 u. f* V+ ^- C
# s+ ^2 R h5 k% a array( "name" => "Insert Your Twitter ID here- k2 ?4 b$ D: O; Y
<br /><em>*leave blank if not necessary</em>; [# x6 q6 f- T
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",4 f# x0 n8 [: h6 r+ d3 m2 m/ v
"id" => $shortname."_twitter",
: ?0 M1 I. k+ `+ A6 Y' u6 O "type" => "text",( a) I* h1 }4 D% y
"box" => "social"," f8 F3 n* J# C) [& U
"std" => "",% v! E& V' e. q: Y- R) b; G
),
, ^; X7 ^3 @9 a8 ~, e4 C: L0 E- R( ^: A
array( "name" => "Enter Twitter Feed Count here
$ d! R# E- |" O) Q( J. q <br /><em>*leave blank if not necessary</em>
! L$ E- |1 b9 _8 F <br /><em>*Enter How Many Twitter Feed To Display</em>",% q y) d& U% m& O9 c/ F9 K4 l$ i
"id" => $shortname."_twitter_count",. Y j) ]# y0 ~( s2 m& x& y
"type" => "text",# ?9 s5 v9 ], j) O. u! n% w
"box" => "social",3 U: X7 q2 ~4 @& O( H
"std" => "",
+ w$ ~! ~% m* u6 m ),
$ H2 D# ], y. Y9 g; g+ B
+ D: Z# j9 B5 ]' h" E array( "name" => "</div></div>",' V2 s _3 }4 u7 ?2 p; X, L
"type" => "close",$ Q0 f/ \3 i6 N5 ~# U0 A
),
% M( w+ r1 {9 C4 N! V6 ~ - u% n# W' ^: b9 S( {) P% N' K8 O' T. B
4 k& c m a8 f& R9 @
array( "name" => "125 x 125 Banners Advertisement Settings",3 x- R6 l- ^3 R6 ?9 D
"type" => "heading",
6 |/ A) d* m% R3 i0 o" J a) y ),
: r0 n7 z# d1 E) D 8 x8 u: P6 h2 @( M( Y8 S6 s
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
P2 H# J R# p, n "id" => $shortname."_sponsor_activate",/ {/ L/ T+ B, v, H! T0 l$ m- u
"type" => "select",
# H4 c' X8 H/ X "std" => "No",! v# r' L ]7 r
"options" => array("No", "Yes")),/ |1 T* F' @/ J) A# o! E1 D* F
- d W( c* M8 H) Y1 W6 I. j( A0 Z
& X5 R& C& `0 q array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",0 |8 }) X3 C3 i! P1 Z) ~, P0 j" Z3 _
"id" => $shortname."_sponsor_banner_one",& I4 k6 t2 K- f0 k8 b2 y
"type" => "textarea",
- y2 o% V, r4 L$ }% D "std" => "",4 \+ t6 K6 t9 _/ k! D* N
),
8 q' u. }* b& h# G
1 Y0 U1 q4 f; W array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
( \; b- t/ M( i2 {" i1 K "id" => $shortname."_sponsor_banner_two",
% J" c% S+ G, \3 |, r1 O; n "type" => "textarea",
, V( J) l/ S+ @ "std" => "",
! h* t; t8 T9 \3 b9 w6 @ ),
) i. O2 W6 g, k' {1 E# E
- P, w, F+ x [0 I) O array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
$ h% z& H, n% R9 v5 i6 ~5 L$ c "id" => $shortname."_sponsor_banner_three",
; U8 y! M2 {0 |5 e. G6 r "type" => "textarea",$ Z. V. R- m- N5 ]" Q. V5 j. \0 L0 X
"std" => "",
% @+ t1 b& L5 X: B: ] ),
7 T& c6 ~9 Q+ k, V6 S: ~8 v9 p/ x8 m9 w+ ^. Y
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",- h G* k `2 m( d9 ]& w# S+ G% _
"id" => $shortname."_sponsor_banner_four",
) J8 Z8 \8 v, ] "type" => "textarea",! l" k. v$ w3 @8 Z9 d. s
"std" => "",
0 @. W2 d( m" v T; W ),' _- D2 a/ E9 `& u+ @$ e) F# d
/ M1 |+ O1 b; T" K* L' Z( }
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
$ U, A0 W3 u ^. n' C( y' L! d "id" => $shortname."_sponsor_banner_five",: K9 `2 i+ f$ l
"type" => "textarea",* Z+ u7 n) J! [$ C& I% h6 |* ~
"std" => "",
& y9 c* {, M" v ),
! o0 s, U& d2 x& |4 T4 T
! T5 E o# O) w9 l$ e array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",9 _9 |% b% P+ \
"id" => $shortname."_sponsor_banner_six",3 W# E! k. @/ _+ K
"type" => "textarea",+ i @+ W. ?+ @9 J
"std" => "",) V+ v8 b1 Y2 \" p v. g
),
: [5 }7 y6 O. b/ x! @ n: j5 t- d; q9 s: M. K7 N
array( "name" => "</div></div>",! _/ I& B1 @* \& v% I( _# C4 L. B
"type" => "close",: h8 H/ P5 `1 O u3 |2 ^
),$ h8 b5 n- k/ j# A6 \+ M
% M. k6 ]% o( O1 r$ L9 R* U! [. B
F/ x' A. U3 @6 Q
0 x4 _- _2 U) i- A. V);. y/ |' P( l( E9 s( p2 j ^# L8 M
8 f7 I5 U; e# t5 C9 }3 ]; j
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {' D1 x! ?& L/ \$ N" q$ y+ W
* L, B) Q" Z, j; j. y+ p0 v# Jecho "<div id=\"admin-options\"> ";
: `; f6 _$ B L, d3 p
( X: B2 O6 b3 C3 p0 wglobal $themename, $shortname, $options;6 K' ^$ ]1 s1 o- o S. ]" s
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
b9 v+ u- V8 Z' r1 w; N* fif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';' S2 e5 O' K! ^0 R' y- [7 Z, ^8 Z
?>2 v0 J# `/ C5 P+ m( R/ t$ y# D) r
% y! C! B9 d& F<h4><?php echo "$themename"; ?> Theme Options</h4>
6 J# i: p }3 Y( C$ e1 y, i& j" `0 N+ @; k" l P; P' Y- J- G1 A$ Y
<div class="annouce">( n1 P; m/ Z! o
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
1 s( r1 h" H5 ~0 U+ n; _<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
- w$ Q1 _) W$ s* J5 y</div># q j8 a) @" P' L2 R# ^; p9 E
3 Q }2 ]: J; t<form action="" method="post">
! ?% S% V* G) R) q' M6 \8 M7 M
4 L9 c3 X8 v& M" Y3 x<?php foreach ($options as $value) { ?>
- D/ h0 \" N2 m( s, U' [5 w
& w) d! \8 l2 ]* N' k& c1 N+ Z<?php switch ( $value['type'] ) { case 'heading': ?>
( G% ?+ v. A/ s( @2 I: O% M5 i6 ]: ]* n% W6 ]2 {# R
<div class="get-option">, t. W, w1 R1 H
' A, u: O9 Q7 }3 | |" F4 B0 _<h2><?php echo $value['name']; ?></h2>( H2 {' m( o" M4 Y& A* [
8 U8 m: \' I4 Q3 }3 {* ?<div class="option-save">
: I: i7 h# L! \; p' N" E
- A: Z% ?4 d4 D. [# L3 d" n<?php
0 V' \/ u) l: vbreak;) Q* _% T2 ]+ A' l" K1 ^ g
case 'text':
: k+ M$ \4 l" T?>
5 W; u, @( @; j( O* Q& F7 d4 A' E* D
<div class="description"><?php echo $value['name']; ?></div>2 o9 d0 q% |7 W/ m* f0 {9 n, ~
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (. n5 w5 G! U+ M0 n1 H- H
+ A5 F6 s% }' S% ?, z; K% A" d
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>+ E5 T5 e6 C3 y5 Y4 Q5 y$ n3 R9 o3 s- r% I
9 M+ O+ G8 K. ^$ O
<?php* b% C* I$ b; g( {
break;
6 Q, Y J. ]1 C3 s# ?' pcase 'select':
8 K& ~! S; F, G3 J7 z; m; W B?>& _7 }! c$ h U
7 }1 l8 m z' z( D f+ h<div class="description"><?php echo $value['name']; ?></div>
* \5 v* l; }0 g; \3 ?<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">% X f; N; L$ P9 f, F* _
<?php foreach ($value['options'] as $option) { ?>
' S& }! x. W' w) g, [<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option> j5 L; | R& w/ k; d
<?php } ?>
, ^) N1 e' ]4 `5 G4 t. y9 {</select># f) ]1 k) u. B9 n8 S) @
</p>
: N% t* Z" d5 f2 P; A6 }( ~- D& i' z# E, N- @5 }$ P% x( k7 l+ |
<?php
; {: X$ h* B; A2 _" s" vbreak;
) u5 g. d3 }9 ^8 J. Dcase 'textarea':( X0 p: ?5 s, ?* b" f7 d7 l/ f
$valuex = $value['id'];: B$ Y/ z* J- T5 ]: P6 h& o, j! H
$valuey = stripslashes($valuex);; \5 b% M: e' @* ?0 w
$video_code = get_settings($valuey);
7 F$ y0 I2 V# |/ x% ?: \: d: F?>8 h! ^; Z1 Y# h" G
0 }9 ~ t% T1 I z* T# {<div class="description"><?php echo $value['name']; ?></div>
, X4 Q7 M9 W, d X1 e<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
% I/ N! K3 @& j7 J k( D9 C% x: f1 q
else { echo $value['std']; } ?></textarea></p>0 q" y9 U1 {2 [+ d- t3 y
# U, o. z* o5 l2 I
<?php1 E5 G0 Z+ d. V; B! U! A
break;
) ], M8 s; _2 Pcase 'close':
" Z$ u& S& J7 R+ {& E; h?>
! j. _% m$ p3 Y- h$ D
7 e7 g% a+ F, C* [ s<div class="clearfix"></div>
' ?& t* V* L* C; C- V. ]</div><!-- OPTION SAVE END -->
; L0 ]$ `* K& C4 f* f
. \' o5 d1 c* q; f' B" o<div class="clearfix"></div>
3 `2 o% H% J8 N9 I5 |</div><!-- GET OPTION END -->
9 E/ O3 e% O5 ], T% @# k6 r, I4 a* B/ a5 ]+ Z8 p+ V/ a' d. A3 i3 p" f$ C
<?php
4 w- b$ D; d' Obreak;
: V9 j/ M( Z, m, R/ }) B3 q0 |default;
0 |- }& h" Y* u, J( }% c2 z o?>& t) ?" ~( `- q0 m ^1 z- G
C+ |/ S3 ^; i8 s7 @5 [
9 e$ ~, v4 `& A% U<?php% D# g7 A* K" w6 I/ O" C
break; } ?>6 k, ~( S3 @+ |# N
5 v8 W3 l$ R5 D) |- l l" m
<?php } ?>
1 Z1 H( p. b& X" q# a
! E8 m' Q) H l8 c+ I1 u<p class="save-p">
+ t5 p$ G( @$ h+ f<input name="save" type="submit" class="sbutton" value="Save Options" />
1 I+ v" z( Z- h<input type="hidden" name="action" value="save" />
) \$ l) T z. u9 m; Q% Z6 `</p>5 A6 g6 H6 O3 y- N2 H& [( U# ?9 T& Q' X
</form>8 u+ x3 i; m' }1 Y( A) y
+ x ^5 K6 @. s<form method="post">, x. J8 Z3 I$ Q1 |0 _6 J7 B, @
<p class="save-p">
# n& T9 v) U! i7 M& h" {<input name="reset" type="submit" class="sbutton" value="Reset Options" />
/ \' [7 u+ S% {; Q' q& Q! k# |8 `<input type="hidden" name="action" value="reset" />
2 x1 Y3 Z$ {, y; G</p>1 s6 G& a* a) r/ B) P
</form>
& ?2 Y0 D5 m( y$ |: J0 g. W/ ~9 t
</div><!-- ADMIN OPTIONS END -->
5 ]! n+ o) m3 N: K& X0 I
; }. J0 Z o9 _<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }, A* F3 ]; l% N7 Y
1 ?$ D! s* g0 l# e. V) _function mytheme_admin_register() {
, p/ k B- o8 W1 _global $themename, $shortname, $options;8 `: F6 o, S* v9 f j
if ( $_GET['page'] == basename(__FILE__) ) {
% v; V" {. h7 I m* ]3 Q: K, W' nif ( 'save' == $_REQUEST['action'] ) {. a7 |7 D6 S. m" _! c4 O* J! O
foreach ($options as $value) {
( A) N9 W7 |2 S b% lupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
5 s5 B$ ~1 \3 _! v% |8 |. k' S; c; Dforeach ($options as $value) {9 d$ r: W& K9 w* X
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }, {' ?( t( t P4 h
header("Location: themes.php?page=functions.php&saved=true");
9 l. v/ C$ j6 v5 r- Odie;% e6 I& O, Z' k: H. S
} else if( 'reset' == $_REQUEST['action'] ) {" b) B. Z0 i U" a8 H
foreach ($options as $value) {
' o% V3 p9 H- ^3 `4 ]' k& xdelete_option( $value['id'] ); }
6 p. y4 `; N# _2 D* Cheader("Location: themes.php?page=functions.php&reset=true");) t0 p: w# N2 u1 i" H% U. Z1 M
die;( c* k" l, N# U* _: \+ j
}
6 ?8 A9 F) e$ j1 c' ~}
0 G6 L5 w8 @4 o! P+ O1 |add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');% v% z" j/ Z( c) t2 U* E' v) I
}
5 B& `( |" e& ?6 t7 T& o+ U2 Y6 e& v" m
function mytheme_admin_head() { ?>
$ v# f% p; [/ M9 B4 s# h<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
6 f1 Y7 }/ J# U3 J; R! U! d<?php }
1 Y1 n7 O4 N5 n1 b5 q$ h. J: Z |
|