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