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