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