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