|
|

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