Skip to content

Commit d94f269

Browse files
authored
Create viktor-widget.php (#51)
* Create viktor-widget.php * Fix line length
1 parent fa86648 commit d94f269

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

mu-plugins/viktor-widget.php

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
/*
4+
* Plugin Name: Viktor widget
5+
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle
6+
*/
7+
8+
add_action('wp_dashboard_setup', 'szv_add_dashboard_widget', 10, 0);
9+
10+
function szv_add_dashboard_widget()
11+
{
12+
wp_add_dashboard_widget(
13+
'szv_widget',
14+
'Welcome developer!', // widget_name
15+
'szv_render_dashboard_widget',
16+
null,
17+
null,
18+
'normal', // context
19+
'high' // priority
20+
);
21+
}
22+
23+
function szv_render_dashboard_widget($post, $callback_args)
24+
{
25+
$profile_url = 'https://github.com/szepeviktor';
26+
echo <<<HTML
27+
<div class="main">
28+
<ul>
29+
<li class="onboarding-server">
30+
<a
31+
href="{$profile_url}/debian-server-tools/blob/master/Onboarding.md#onboarding-for-developers"
32+
target="_blank"
33+
>Server info for developers</a>
34+
</li>
35+
<li class="onboarding-wordpress">
36+
<a
37+
href="{$profile_url}/wordpress-website-lifecycle/blob/master/README.md#onboarding-for-developers"
38+
target="_blank"
39+
>WordPress info for developers</a>
40+
</li>
41+
<li class="questions">
42+
<a href="mailto:viktor@szepe.net">Questions?</a>
43+
</li>
44+
</ul>
45+
</div>
46+
HTML;
47+
}

0 commit comments

Comments
 (0)