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