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