|
|

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