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