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