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