|
|

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