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