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