-
Notifications
You must be signed in to change notification settings - Fork 5
/
admin.php
58 lines (54 loc) · 2.06 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
// This class handles all available admin pages
class admin {
// show the main admin page as a submenu of "Links"
public static function show_main() {
if (!current_user_can('edit_posts')) {
wp_die( __('You do not have sufficient permissions to access this page.') );
}
require_once('sc_linkview.php');
$out ='
<div class="wrap nosubsub" style="padding-bottom:15px">
<div id="icon-link-manager" class="icon32"><br /></div><h2>Link View</h2>
</div>
<h4>Usage of the <code>[linkview]</code> shortcode</h4>
<div style="padding:0 15px">
<p>Link View works using a "shortcode". Shortcodes are snippets of pseudo code that are placed in blog posts or pages to easily render HTML output.</p>
<p>The following is the basic form of the Link View shortcode:</p>
<p><code>[linkview]</code></p>
<p></p>
<p>To facilitate customization of shortcodes, attributes are used. To get the correct result you can combine as much attributes as you want.<br />
The <code>[linkview]</code> shortcode including the attributes "cat_name" and "show_img" looks like this:</p>
<p><code>[linkview cat_name=Sponsors show_img=1]</code></p>
<p>Below is a list of all the supported attributes with their descriptions and available options:</p>
<style type="text/css">
<!--
#lvadmintable {border:1px solid #aaa;border-collapse:collapse}
#lvadmintable th {border:1px solid #aaa;padding:3px 4px;background:#eeeeee;}
#lvadmintable td {border:1px solid #aaa;padding:4px 5px;vertical-align: top}
-->
</style>
<table id="lvadmintable">
<tr>
<th>Attribute name</th>
<th>Value options</th>
<th>Default value</th>
<th>Description</th>
</tr>';
foreach( sc_linkview::$attr as $aname => $a ) {
$out .= '
<tr>
<td>'.$aname.'</td>
<td>'.$a['val'].'</td>
<td>'.$a['std_val'].'</td>
<td>'.$a['desc'].'</td>
</tr>';
}
$out .= '
</table>
<p>This is an early version of this plugin. More attributes will be added in later releases.</p>
</div>';
echo $out;
}
}
?>