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