|
|

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