|
|

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