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