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