|
|

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