|
|

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