|
|

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