|
|

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