|
|

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