|
|

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