|
|

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