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