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