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