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