|
|

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