|
|

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