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