|
|

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