|
|

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