|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////" U$ x' [) X( o& o) ]
// Theme Option; X9 g( v7 S& N4 T; u8 \5 x% s
////////////////////////////////////////////////////////////////////////////////
/ ?& S \6 {7 Y1 e
9 O4 R! c7 A4 M$themename = "Zenx";1 ~0 V4 c2 K0 [9 e+ C3 s
$shortname = str_replace(' ', '_', strtolower($themename));
4 D3 G' b e, x r0 U) E7 n; H; c' q. R2 L, Y) d+ T
function get_theme_option($option)% g; v2 p O7 K" E3 ~
{
4 }; Y- C+ \& d: x% x9 A, Y9 e global $shortname;
. K+ o0 a2 l( u3 F1 T return stripslashes(get_option($shortname . '_' . $option));0 J( g0 J. n0 ]" p$ M
}
. i1 F" s% C9 P7 q1 ?& E* k( K% c
( e" l& u/ R2 f6 Y. z3 B8 V% Ufunction get_theme_settings($option)
% h& v2 R% D' N" v& F$ }" b{1 A S' T. T/ r
return stripslashes(get_option($option));9 e' g1 L# T& A0 x5 g {' p
}
! y3 h9 D* T& K' ~$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");
+ [" C0 [0 C( D$ }$wp_getcat = array();
1 G/ }( o [. L3 u2 M9 W" x1 g k9 bforeach ($wp_dropdown_rd_admin as $category_list) {( D1 h' x% W, R+ X5 e3 _7 u
$wp_getcat[$category_list->term_id] = $category_list->name;
: B; v6 y; H9 Y, f* ~ n}3 [( I' C, C5 D+ q6 }
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
. O w% K+ }7 }. y) A7 c* s$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
4 v' n7 ~$ ]9 [, |; L0 ]& Z$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");" E$ n+ H7 f( k3 y# N4 ?5 a5 ]- R
! v+ y9 A2 {) Y3 f
$options = array (- x& @5 V9 b2 Z: x% ]6 J& h4 w' T# g* [
% s, W6 W# }8 h0 v2 C! m' A$ v# u
F- S, L% R" e6 x array( "name" => "Blog Header Settings",
) \" O3 _1 _0 R2 ? "type" => "heading",
8 [' a7 j& H% [; i ),
( h6 e% b- S; _: c0 p' i; k
, Q/ G6 y- B) g+ l7 E0 N: N% K# O array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
: [, @* m3 ^0 X+ J& v7 c5 Q "id" => $shortname."_header_logo_activate",
4 S" C$ `0 ~7 E% G, z- R "type" => "select",
0 i' q' C8 g i' {2 N! O5 O "std" => "No",
$ T3 @1 }% u& B "options" => array("No", "Yes")),. P) b/ q! a8 w. f7 |8 r
" o* J2 }" g: g0 B1 e% w" Z array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
7 K7 W3 b: m P! T `! N "id" => $shortname."_logo_url",
4 e, T3 Q( g1 t "type" => "text",
( d% @4 s6 q6 a) Q3 p "box" => "social",
+ N& }/ b/ a! ~" I6 } "std" => "",
( `, F. c N1 G+ V ),8 S" W2 a- R, x: p- W" C
. X$ k% @% G+ Q$ @% Z {. W8 ] array( "name" => "Insert Header Banner HTML Code (Header)7 l& s( r' j) B, Y8 L; h# q, I
<br /><em>*Recommended Size 468 x 60</em>
3 C9 y) R, F1 A1 E7 h7 W <br /><em>*leave blank if not use</em>",4 q1 z' f9 e" p0 p7 m" p- H; y
"id" => $shortname."_header_banner",) @# S2 u* G0 R, a9 u/ D( |
"type" => "textarea",
, O0 u/ ]" `& ~0 ]" p* K "std" => "",, M6 m1 b& t5 v, j
),; O0 C% Q- p4 G1 X
^! U9 n' b; _4 m/ e5 J8 T) B array( "name" => "</div></div>",
5 F$ N- h. q! x, A1 M' V "type" => "close",
- U9 x$ X- {: { ), _4 y" h W) O7 g8 G7 ^ ?
( ]3 J% e0 s$ `* j3 p$ W2 O5 V
. K" d9 N- o$ Z! Z
array( "name" => "Header Navigation Settings",& I" T+ i, P2 j6 `/ t. s5 W
"type" => "heading",% K5 R/ @: c! O& \' \) M
),6 v2 R' R7 Z% `8 M7 O
+ U3 ~5 V1 A3 s7 v
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />; o' Z* t2 i6 r+ E5 n: x
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />' W# T3 C- N% U9 s" |: Q/ \
<em>*Enter the page post ID number only</em><br />! ]/ i% m+ s* ~! R5 q) n
<em>*separate by comma</em><br />4 a) O* L# y; Z: d! P1 h% o
<em>*Exclude pages which you don't want to show on the header navigation</em>",2 ^1 X F0 m& K: p0 [
"id" => $shortname."_header_page_navigation",! r4 L2 |1 f8 P* i) u+ r$ G$ x8 S
"type" => "text",
9 y* j0 u" w; f5 I4 v9 ] m "std" => "",
, H& P! w8 l: l ),- h+ r/ \, \) Z* I# z. f
' y: [0 o7 w# F5 e# ^" A+ g, y6 D array( "name" => "</div></div>",; M9 S# ?$ N Q( ?
"type" => "close",
2 z1 R, j( A- H& k. m$ l ),9 M1 H, b8 F; r( x- M: |* }
; `( n0 R" m# n/ E x
" }2 K/ U5 g! t+ [( C) K8 }' L array( "name" => "Post Auto Thumbnails Settings",! m2 o( l. Q) L
"type" => "heading",$ H; P* Q* q! R. Y# t
),
0 e* ?2 d( C2 k1 x" |
K- A% v. G& w Z7 g& N0 J array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",( {# D* }$ M4 U* }
"id" => $shortname."_timthumb_activate",
5 R& E9 X' r7 a* r: G "type" => "select",* p! t" |7 Q1 Q! o# }
"std" => "No",
+ V1 G7 ]- _; h7 {/ O" f; c "options" => array("No", "Yes")),
. }) E! h$ g# [2 y* _
2 u0 o' g6 I/ T! U% q% K: J array( "name" => "If Timthumb is enabled, Please choose its cropping method",! ?- L" P0 ~4 D. B+ N) v
"id" => $shortname."_timthumb_cropping",
& J+ k t, l2 c2 ~ "type" => "select",
/ }7 v8 q' K5 m' q% _' N' T "std" => "",
3 w& o- W7 m# d& n: \ "options" => $crop_position),+ S* p/ ^% W% e9 \" u# F! B) o
" V% o" S% I! v" W array( "name" => "Insert Width Of Thumbnail Image<br />7 O, \- {( `: j+ ~, B( ?# Z
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />& K7 Y' t7 p' b6 K) k; |/ U( }
<em>*Leave Blank To Use Default: 250</em><br />",
0 ?' F% Z( U9 y "id" => $shortname."_thumb_width"," _% i& x3 C3 _6 N) S+ X2 y0 b
"type" => "text",/ K6 E+ z+ ?$ j1 U5 U$ ~9 h" q" F
"std" => "",! Y" ?% C& Y! ?; i, ~/ @& C4 N
),
4 r+ N7 o4 o" a" V
; W% L1 r d+ L8 Q$ _( s array( "name" => "Insert Height Of Thumbnail Image<br />
2 p2 R5 E& m# t# q) y; t7 B <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
8 o6 A# T1 [/ X. N$ ^1 |/ [ <em>*Leave Blank To Use Default: 200</em><br />",( t v7 f% B- _% o
"id" => $shortname."_thumb_height",( G0 S. ?7 @% n, ~
"type" => "text",
U; W, S- z: z "std" => "",
$ h( |0 t/ L% Q( `/ A ),7 g: v% [. m+ a1 f9 f
9 N- J1 M) }! Z7 q
array( "name" => "</div></div>",- r9 J( ?. T6 c1 ?5 H- Q
"type" => "close",: n2 N2 @# Y5 Z4 y! ?
),
* `% `' {; W) `
: d( }3 E4 J7 P: e) _ array( "name" => "Featured Content Slider Settings",
( a4 r: {' C1 V# D8 C. `) Z "type" => "heading",& D( j+ D: k2 m
),0 g D( ` {6 n" @) [( ~+ c+ e" B
9 {5 v K" V2 i4 x- g array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ E4 p+ H9 T% L+ ]
"id" => $shortname."_featured_activate",
% A! a2 K0 J! M" p6 z% m "type" => "select",
6 L* N5 }" j! g4 w "std" => "No",: |' j4 n) V" F- t) u$ _ N3 f" E
"options" => array("No", "Yes")),
9 y% B, Z; _) H# g2 z) ]
( T5 h' ]+ v; f6 | y6 U
& w% r% G J& r3 S array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
5 @) w6 I o7 h "id" => $shortname."_featured_category",
& V0 \; ]; R; i' i* w "type" => "select",
% l# M9 A4 m. N# a) j "std" => "Choose a category:",6 O2 k3 P# L- I j9 E# ]
"options" => $wp_getcat),+ X* S9 _) o* T/ n/ C9 W; V
0 g7 a" r% o* y {
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",# U6 A P3 Y: E9 w
"id" => $shortname."_featured_number",, b1 a( \! X, |6 j/ _( ]
"type" => "select",* u2 h. e2 A, G E( K5 l
"std" => "Number of post:",
; f2 i% S+ _& ~. i7 j% A "options" => $number_entries),. g7 o/ E* s! f
$ e& C) } D) f8 w" |/ y array( "name" => "</div></div>",
' R1 Y, G U+ j2 ]3 I0 s "type" => "close",9 \1 _, H+ o3 V. m, @' v# _
),
+ h1 K: [$ }8 R1 j5 o4 y6 N" b3 q1 Z
! M0 `5 J0 P8 v/ [ array( "name" => "Featured Category Settings", I2 t8 H& @3 I# ~* g
"type" => "heading",) c2 a% }$ I6 z& M$ o
),
$ J+ q/ a% A5 R# Q. O
1 Z; G* Z: `0 T7 J. p# K' U array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 `1 v: U) Q1 g "id" => $shortname."_featured_category_activate",' I2 i4 N+ F/ m3 h
"type" => "select",
* I6 i4 [. S8 j( i) A "std" => "No",
2 L" e( t+ e0 ^9 j% N/ M* k "options" => array("No", "Yes")),1 i$ V, C& I# t' k, y) `7 x) N
! c* I" }! |5 x3 m
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
+ u; R3 [9 Y; \9 L- d4 d "id" => $shortname."_featured_category_id1",
3 ~% H/ U! ~1 F7 s& h "type" => "select",1 U4 F# {! y: |' U2 u8 i
"std" => "Choose a category:",3 H7 `1 ~* f1 ]4 D. F$ Z$ h
"options" => $wp_getcat), {8 H' R+ z7 x& v7 `# J* z1 |$ j
0 B6 U% u% e K1 ? array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",8 ^0 H! H# N, Q! W
"id" => $shortname."_featured_number1",
) R5 t( L; [0 b( _9 d. L "type" => "select",
% \* y9 Y R7 U$ C) P/ R "std" => "Number of post:",
% g& v: `% T0 |, s) j) U "options" => $number_entries),, N4 s4 g- Q/ e) z3 e" e! z
3 `# k% k! t: ]# l/ _
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",1 @5 R4 ^' I5 V& [# ~
"id" => $shortname."_featured_category_id2",' \# h/ z; Z( [. F+ e3 i4 I
"type" => "select",) y" B( D+ I! k0 j, V& W
"std" => "Choose a category:",
1 ^, v3 I, h* i) ^ "options" => $wp_getcat),
8 }" V* P* x, u& _7 b# X
7 v& J6 W. e, ^" A, v array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",' K& K# E6 P' p+ H# F! e( G9 G
"id" => $shortname."_featured_number2"," W5 E7 E+ E i
"type" => "select",* G# p" @/ ~2 _
"std" => "Number of post:",
# O1 a4 {, \3 l0 ?& m "options" => $number_entries),
. S/ P5 E& w& J$ J- \: S) l 1 C8 P' C6 r5 e
- G3 K: J: s/ r& B$ {
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",4 f$ H' v- ?! ?4 u3 k, s6 F
"id" => $shortname."_featured_category_id3",
- {# [) X+ M: u3 p2 f( k3 a "type" => "select",, o+ L( X+ V6 e9 w9 T
"std" => "Choose a category:",
& F9 r( }9 @0 o R0 v% B# w; z2 X0 R "options" => $wp_getcat),# Y9 T1 c# x* S r7 Y: y3 o
. S2 D) S% r y* w5 t! j7 z array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
; F$ ?3 ], i0 s- L# v "id" => $shortname."_featured_number3",. B1 l p! U0 p5 R
"type" => "select",
5 \# b) B5 F( O: f& Z0 E "std" => "Number of post:",
$ S) F1 X# o4 |9 T8 x. K "options" => $number_entries),0 q$ ~8 j6 \# N5 h3 [ P; N
$ G/ L+ r M3 D0 w" |2 L/ M# \1 z. ?7 b7 o
array( "name" => "</div></div>",
' k; ?" Y7 O' m* } "type" => "close",. _" |' ]9 f/ M, Q
),
" A8 o# i' o1 i0 m/ p; y5 q$ p4 o9 R3 U: D$ a3 z$ v
$ E; }" ?( `1 j+ A! R7 \
array( "name" => "Google Adsense & Analytics Settings",
% x: f+ J7 e( [1 m+ R/ o+ v6 F "type" => "heading",
3 W, u2 B2 E6 R/ r ),+ x: Y2 S8 b+ H; j/ _6 U
) t) D3 }% L- O" h+ _* L5 R) z$ Q
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
6 M# \. p& ?- N; b9 B "id" => $shortname."_adsense_loop_activate",7 E1 S* {+ r' N* J/ ~5 g. T- V5 ~/ n
"type" => "select",1 D2 O3 k- Z4 ] Q. I
"std" => "Disable",
! H. c! y7 f3 K4 j "options" => array("Disable", "Enable")),
g# F8 ^, I2 v% }2 O( y1 z. u0 K$ _. B& G4 O
array( "name" => "Insert Google Adsense Code For Loops Here<br />0 p: }5 n* \- S- }& N
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",0 f1 v& z! e8 ]$ g0 s* N! g( ]
"id" => $shortname."_adsense_loop",- c! C' O) Z0 x7 I
"type" => "textarea",0 c- |7 Z' v( v9 d' i& V/ o/ e
"std" => "",
. B# o; V7 I* I6 g8 u3 o- r3 j ),& K \$ k- {& t) u+ Y) C
$ A7 i% O/ M% K6 @
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
3 g9 ~! J' \! K# l+ R/ p6 n "id" => $shortname."_adsense_single_activate",6 v2 a9 Y" _! M- c1 K* e
"type" => "select",
/ T$ e; ~ f5 C "std" => "Disable",7 w2 a- B' V* T( ^* |
"options" => array("Disable", "Enable")),2 W- a1 a N L9 g2 |
; r0 ^+ K/ Z1 S' r1 I6 @
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
# d2 d/ r7 z- e: l \ <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",, B) e: {1 X. P" K
"id" => $shortname."_adsense_single",) o# J" t! D# C5 v% _, F8 F1 {
"type" => "textarea",* ]2 u4 Q1 m4 M4 c, `1 A
"std" => "",
8 U" }* T* b; C: } ),
$ l+ X! n! c& s& D( C; z
1 ?! m, i; i* S* S! f4 d" S* s5 I+ m/ f; J: U" r5 Q0 M
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",: {: y" s" Z! \ U. K5 _
"id" => $shortname."_google_analytics",
8 E2 [. o& J; x- Z "type" => "textarea",
5 |2 C1 u) H# b1 n R "std" => "",
1 I% h$ I# A! x ),% W. \3 p v$ F6 M
5 v6 J$ h5 J K
array( "name" => "</div></div>",
: G4 A9 D- H2 S2 W# S: E- c "type" => "close",
0 ] \4 d. z, S" ^. M ),# u; G; O; o; N% j4 d9 [3 f
! R+ Q9 E0 e/ g( b6 m
( C/ }( W, c. b% W' M4 I array( "name" => "AddThis Social Bookmarking Settings",
% p6 _$ B2 ]; s0 J$ f$ }- P "type" => "heading",2 b" s* ?; p& v# g
),' L2 I* j" y5 q h" I9 ?
8 V; T3 b7 t ?7 R1 F
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
: o9 K3 Q* m) C! @6 G; k9 C <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
& g/ Q3 W5 s/ V8 A "id" => $shortname."_addthis",
0 z; n( v n; j' k "type" => "text",6 `% o8 T, d' `: B% w4 q4 l: u
"box" => "social",
9 l+ N+ i; W1 W5 k "std" => "",
8 ]) T. M. O; k+ E6 d ),7 w y2 C% W0 q; s
* v' s, v, J5 |; s1 \7 t
array( "name" => "</div></div>",
$ L9 u T% E7 N3 w1 c "type" => "close",
3 b$ L0 i E& e: G ),$ ^# q' U" |# i- ]- m2 n( U6 Y. N5 }
5 m# w5 h# c4 b1 ]- n8 S
! l! g' M% a- F) ^8 ]6 E _
/ V' @8 A) Q- Q; i array( "name" => "YouTube Video Settings",/ g, v1 k3 V. ]( ~/ j* f4 }
"type" => "heading",! o* E$ X; u R# r, v
),
7 M! V6 n& X4 }0 z" b5 a# B
7 }) K) d0 j8 E6 j& s4 }$ b7 I array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
& T9 t$ I# }1 B6 z" ^2 d/ M0 Y "id" => $shortname."_emvideo_activate",
, ]8 o2 _4 e$ W. q5 H' d( R "type" => "select",
8 K5 o* R* x$ A( l1 y- e+ S! i "std" => "No",! U( B4 J4 ?. s5 E1 P- q2 e
"options" => array("No", "Yes")),, u0 T$ l# M$ W- U% S% T7 E
( i- C1 W/ u( r; d
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>",
( J' ^, R4 M, U- k "id" => $shortname."_emvideo",. K* F3 l! w+ P( k" L
"std" => "",( L+ T8 O1 D0 J2 X! ?
"type" => "text"),
& y! ]3 P1 z2 r2 A3 z5 J7 [" K& O
array( "name" => "</div></div>",0 l: i$ ~# I( k5 M( b7 \! G$ n4 B4 D
"type" => "close",' ? `3 @1 s( j" }2 _/ l
),
4 |; \1 o1 ?; M. \% J; o; ^ 4 B: d5 O3 |. n) U5 G& @. u. P0 N
array( "name" => "Twitter Settings",/ o- W! y0 z0 `6 y! v% ?( X2 _- D
"type" => "heading",& h- u. l0 P4 l! a# R$ g5 ?
),+ r9 ~/ [& ]! Q, m# W! l! R; d! O
9 ~$ i) P5 N9 `/ | array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",% K4 S2 d, B# h) s! c
"id" => $shortname."_twitter_activate",! F' p4 Z( b: z6 s7 A
"type" => "select",
% E3 n6 B% k3 A' g# k "std" => "No",1 J+ q9 N# z V+ K
"options" => array("No", "Yes")),+ O9 }4 Z# a( f7 B' {
( {0 c m, p0 t1 O array( "name" => "Insert Your Twitter ID here
0 J( K5 ?( `' \1 g8 U: W3 ~ <br /><em>*leave blank if not necessary</em>
8 n4 v, l" z- y5 R0 _: d' u7 H3 B$ o- A <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",5 q" \; M, @7 Y9 T6 l. T- M0 r
"id" => $shortname."_twitter",
/ _* m7 j' `8 T+ ^9 a( E "type" => "text",
( i* s+ V9 P; X$ [& ~ "box" => "social",: y9 d2 d3 H* X2 K$ i( k
"std" => "",
$ Y7 }7 d( P7 E ),$ S- V1 E3 k, [9 R( Q: |0 C
6 i u6 V& B4 P5 p2 Y' p# ] X array( "name" => "Enter Twitter Feed Count here8 c- I7 W/ b4 y4 L/ y% U( H
<br /><em>*leave blank if not necessary</em># A0 Q, C0 Z: ]/ G" Q
<br /><em>*Enter How Many Twitter Feed To Display</em>",
: {1 |/ G( n. N2 }+ f "id" => $shortname."_twitter_count",
" A- o) [. @( A8 B: |7 N1 B "type" => "text",
' s4 ?0 S0 i4 Z& K "box" => "social",
& U& ^( c: w& D1 H "std" => "",5 O! F, ?6 _) ?2 {; ]' j5 m$ G4 V
),
' n: @& S) V6 I: X9 x/ \' m$ C* _+ x$ P( C: g* h! }# h2 L
array( "name" => "</div></div>",- v- }. n; k5 `! m& ~3 o/ `
"type" => "close",2 b0 v/ x$ P& W( M5 X
),( ~, u: P/ X; ~
/ e9 T6 |' |, j
. z4 ]5 r6 ]" K4 `% l
array( "name" => "125 x 125 Banners Advertisement Settings"," `/ q u2 U& M; p
"type" => "heading",' R$ H) c* q1 i: h
),( x$ i$ C' @/ O S' G y Q
# j4 G) l* R1 m' d* E array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
0 O" X' ^8 @; v' O1 M "id" => $shortname."_sponsor_activate",
# X) K: i& A5 b4 R% s9 E3 D/ F "type" => "select",
8 A9 e; S4 c1 f4 s- ]$ q9 o "std" => "No",
, p5 {3 s/ R. G ~3 y3 x "options" => array("No", "Yes")),
! [) @* K4 J* f9 M: j. x7 n
@2 o3 e$ n. r. u! x# [
5 E. q5 U+ s1 T7 h6 B# J array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
* [* b# `( {) L b" T0 ` "id" => $shortname."_sponsor_banner_one",
. ]( j! N6 p& j "type" => "textarea",- m4 Y: g5 H( b# J8 i8 T* R
"std" => "",: ]: Z% u/ k; A
),
8 M) K6 B. u* t8 ~$ s) b6 g) R# s n8 ]) N l
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
5 T4 L5 c9 F2 G0 P "id" => $shortname."_sponsor_banner_two",
0 D' [& ?# ?4 e& H "type" => "textarea",
9 W) D% l3 _$ O9 I" d "std" => "",
4 ?' {4 a: a! B( d9 F+ N( U ),: h, Y6 `8 V: m$ w
, g) U7 z, T6 }8 q( p6 _8 e+ {
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>", r; r" v Q' l+ U& y6 C
"id" => $shortname."_sponsor_banner_three",) ^+ j6 I$ Z1 @( H1 M4 U5 X5 C- r- r
"type" => "textarea",
6 e/ x/ B' y- ?; T "std" => "",
2 \4 X$ {& y0 L ),* u4 C5 k$ |: @7 }# X
. h$ H" I( J2 [& F! x array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
8 {) g1 j; k# o; h "id" => $shortname."_sponsor_banner_four",
2 Q8 F% m5 w0 ]' G- Y' V! ` "type" => "textarea",
, }& E- s3 q- W6 ? "std" => "",
* d0 N3 E* }6 V5 ? ),
% B+ u8 R+ U2 i. I7 X4 y( \+ a, s' L% N" u) z5 r+ K
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
* P( E4 }' D% ^; A9 |+ V "id" => $shortname."_sponsor_banner_five",
& |) Q4 R% N; m1 {+ q/ X "type" => "textarea",
6 `* _; J+ q4 o, p% ? "std" => ""," T9 V$ s6 @7 F$ S! T( K
),
& |1 W9 {9 Y) ~; A- {9 h3 w O- z2 d8 a
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",- H n) H7 p6 E7 n( g8 E4 [
"id" => $shortname."_sponsor_banner_six",
+ u1 K8 J: T7 Y0 k0 u, C "type" => "textarea",
; L1 b/ @! W/ ^" _, O2 T: l) L "std" => "",
" N$ r7 Y9 Z- i. x) Q ),
% j* _* r1 s' y) p: D/ S0 B* {# z8 p; x5 Q" \$ o" e$ A; }% j
array( "name" => "</div></div>",
) Y: H4 ]: x3 ?8 W0 a "type" => "close", b# p% R; t4 V8 \6 S
),
5 @8 P% q7 r+ B% L, u- L
8 ~5 ?7 z$ ?5 h0 J! e. A( Z. {6 ~' C/ f0 p. K$ n2 `
% e# E* K# q, N8 a+ T) w( ~: J! ~);- F- N- l8 _. O8 q
' t, F) E; p2 efunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {! G8 R6 @4 w h+ s4 Y4 L4 ]
- l4 D9 t! a. R. y5 `" {echo "<div id=\"admin-options\"> ";
$ W$ w1 Y0 {: R
( q2 Z/ V+ z9 Xglobal $themename, $shortname, $options;
; Q% Z" G3 l' d0 L9 |/ G! C2 G, ?if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';; ^% G$ \0 }2 N) e5 X
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';+ L' C. v6 R& D+ i3 F& Q
?>
9 C. ~# J% J- b: H. p- g" F% N' p2 X, r: M7 U; M: [7 V
<h4><?php echo "$themename"; ?> Theme Options</h4>
$ w6 T! w+ y5 [
% U2 h B. k. Y) C; D8 y<div class="annouce">
" k) W/ c" }: O8 o<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>- k( h" I5 o, n3 N; E( V4 |
<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>
- E& f) b- g9 I/ S* M) G& @0 i</div># I# A4 p2 [% D! b
& M2 |- p2 x* }, a
<form action="" method="post">0 `7 @) ^ h+ F& b4 v7 H
* A; l5 o' c3 m% g4 l4 W<?php foreach ($options as $value) { ?>
9 K# M. l, t# h' _9 }4 @
0 A- q g/ N" o5 g, G<?php switch ( $value['type'] ) { case 'heading': ?> W; D |5 m2 t6 G& o
8 ?0 e' k) U; ~+ _<div class="get-option">, w) T7 @, s5 f- x
' a+ Q0 ?# d+ H<h2><?php echo $value['name']; ?></h2>, s" ^" G9 N I0 Z
9 y: F; ?2 w, X1 I6 y
<div class="option-save">
* j1 b$ g/ X! N+ b* d
# A, `0 y6 m3 d" @, q<?php% _ G3 E. g% n/ T7 S( b" K
break;
3 o8 H3 t0 |2 P4 e& f, Scase 'text':! w1 s8 \+ K* ~* }4 P' @8 I( t
?>
1 ~' o2 U) Z7 R/ h1 b4 U8 C# S* \# \
<div class="description"><?php echo $value['name']; ?></div>/ v+ X2 t8 G/ ~9 V' b& {
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
2 n9 X5 c$ A) e, Y: @. W H2 y# X. ?- E) A' C; e4 u3 V( J
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>" a' {. V2 H# b+ b/ u" W
4 W S' A6 L# K8 K- y& X
<?php
( `3 u$ g1 }) J# X6 c/ Mbreak;& c8 E9 X& t- g; U/ }! m2 ?
case 'select':
( @+ M6 e6 F0 ~& w" I, ]?>8 m: l3 m; u& y d( ~7 F2 ~
2 L# C; b- d3 s; N" |: Q. v
<div class="description"><?php echo $value['name']; ?></div>
% O$ E. C6 `' n8 f* ~/ }% I<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>"># [4 R0 U% f/ f" V7 ?# V! i1 y
<?php foreach ($value['options'] as $option) { ?>
/ r- F6 m& w$ F0 M" z/ G9 A, D<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
' a8 u$ i6 @! p; t) f1 [+ B<?php } ?>
) G; N4 z5 S A* |</select>
( p2 h/ S8 B/ W- W</p>
8 H8 N9 |* C3 x, u/ @: @: b! o1 F; a; Z
<?php
/ N3 Q m8 L4 }. e1 S4 @' Lbreak;
9 S, Q2 p' r) hcase 'textarea':, P1 e6 ~$ d3 c2 e$ _. w% n3 p9 i
$valuex = $value['id'];& f8 e' Z# A' y
$valuey = stripslashes($valuex);
1 Y$ o- _2 r; H6 _! Z5 S$video_code = get_settings($valuey);6 D e+ ]" e. N# W8 l
?>
! }! T1 V- Y) }0 H, H! d3 k# Q0 F: N( x$ b2 d
<div class="description"><?php echo $value['name']; ?></div>" o0 c: t7 ?5 u8 B
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
. g% E7 {; K/ F3 V% @5 d8 y. l, B8 L4 B( c
else { echo $value['std']; } ?></textarea></p>
* t0 `. o* ^6 H
' |% N& T5 T! Q$ N<?php
& E- O2 Z/ o7 X5 bbreak;
" k x4 e+ t& b( F1 p& \! Xcase 'close':- S# L. i& A2 [! [; V# I8 j: w
?>+ t, g* B% j! c
' v a3 x j) P9 |( Q) k( F<div class="clearfix"></div>/ t9 N6 v- T& I8 U; K; f
</div><!-- OPTION SAVE END -->
* _9 n0 g3 ^, G! W/ R1 x
: |4 L v% R D0 X3 y: d# t! @5 }<div class="clearfix"></div>
- {8 o, z P7 {+ \; O. m</div><!-- GET OPTION END -->( V+ T, X& e2 H7 R; Q
: {3 C6 r; R: z P/ P- T
<?php5 W" L( e! e0 r
break;
5 W" E" Q* W5 m& N3 k+ D" idefault;
5 H; A8 j; i) u! v" U0 l, A?>
. j5 r+ @- `3 Q+ R. F( d/ X
, _' j1 ~7 i; ^( H% l& k/ r' d7 v
<?php
H" J3 c M! x/ O0 E8 D- Hbreak; } ?>
1 {3 v# l4 h% |' g' Y! R( b5 \4 s( D( d L/ s7 I2 c$ E! F
<?php } ?>
4 l+ U2 e/ a9 i& B: L8 v8 V# A
; I4 C; a" j* }- B) f! w<p class="save-p">! T" m. s! z$ N2 C- U( R
<input name="save" type="submit" class="sbutton" value="Save Options" />- Z, ?! b$ }1 a1 n( k' m0 D
<input type="hidden" name="action" value="save" />9 G# \& G- v; ?: T4 r0 Z, `7 |* }
</p> l" r; L, s, F9 r
</form>
& Y" Z3 ]: w$ `& ^6 B$ y Z0 q7 D5 L
<form method="post">5 e! g( y: \) i5 j, M- A
<p class="save-p">
5 T- n% i. C* j; _" a. U& y* k<input name="reset" type="submit" class="sbutton" value="Reset Options" />2 U+ f3 V/ y9 m) _
<input type="hidden" name="action" value="reset" />
+ Y0 J3 h/ U9 i. w" R9 d% Y( o ?</p>
& b0 L5 R% X2 C+ W- ]4 w1 v</form>
( y( {, B3 Z1 L& b K1 L D5 n9 s& M8 O6 _$ C+ t% E/ ]9 ]3 |7 `
</div><!-- ADMIN OPTIONS END --> {9 r& d! f6 S! g! N t3 c
" j( Q0 }; u& Q
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
# I! x6 A! c) c3 g( Y8 S8 B* H0 a1 y4 C' T% V" G
function mytheme_admin_register() {( y# W+ Y6 w* B& x6 G+ Q' `8 m8 ~
global $themename, $shortname, $options;
+ ~2 h$ r9 _& y; lif ( $_GET['page'] == basename(__FILE__) ) {/ g6 [7 a; o# Y/ b0 c! E/ U
if ( 'save' == $_REQUEST['action'] ) {$ V+ d3 J' d' z5 y7 G! |+ h: N
foreach ($options as $value) {
/ s6 M$ i' q- X1 w! y) supdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }% W' O( P9 H7 r1 j% Y9 Z+ o
foreach ($options as $value) {1 p$ N" D* p9 a: t; ?
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
1 M% C. n% w5 p3 zheader("Location: themes.php?page=functions.php&saved=true");: t4 _/ B! ^5 K. I
die;! R# h! b6 @1 t7 j" o- I
} else if( 'reset' == $_REQUEST['action'] ) {; D/ E2 s7 g' {* f4 R
foreach ($options as $value) {
8 a% K! p: s$ N, W5 H8 R8 Fdelete_option( $value['id'] ); }
+ V& p# i, x8 d6 ?+ rheader("Location: themes.php?page=functions.php&reset=true");
" y) i( q' {% E4 o: \die;1 a3 I( N3 S8 e& ]( {! |& x1 j& [
}0 Z7 Z7 H% |, z
}# j" Q+ X; _" F* Y1 b9 c
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
0 r/ o- b3 G& q1 K( Q3 E& w}( W2 v5 e# j9 \/ e0 J
1 j$ K3 {% [+ c0 q7 g
function mytheme_admin_head() { ?>
* Q8 V( L+ e) q<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />7 l2 S/ x4 ^. |5 @7 G' e: B3 v
<?php }
: l$ w* t' K/ W) j |
|