|
|

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