|
|

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