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