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