|
|

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