|
|

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