|
|

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