|
|

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