|
|

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