|
|

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