|
|

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