PluginProbe
MyRewards / trunk
MyRewards vtrunk
5.7.8 5.7.7 5.7.6 trunk 1.2.2 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.1 2.2.0 2.3.0 2.4.0 2.4.1 2.5.0 2.6.4 2.6.6 3.0.0.0 3.1.0 3.1.2 3.1.2.1 3.10.4 3.10.9 All 165 releases
woorewards / include / doclinks.php

doclinks.php in MyRewards trunk, at include/doclinks.php

52 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace LWS\WOOREWARDS;
4
5 // don't call the file directly
6 if (!defined('ABSPATH')) exit();
7
8 /** All Documentation Links*/
9 class DocLinks
10 {
11 const FALLBACK = 'home';
12
13 public static $doclinks = array(
14 'adv-features' => "https://plugins.longwatchstudio.com/kb/combining-systems/",
15 'customers' => "https://plugins.longwatchstudio.com/kb/customers-management/",
16 'disp-points' => "https://plugins.longwatchstudio.com/kb/wr-sc-points-information/",
17 'home' => "https://plugins.longwatchstudio.com/kbtopic/wr/",
18 'points' => "https://plugins.longwatchstudio.com/kb/spend-money/",
19 'pools' => "https://plugins.longwatchstudio.com/kb/how-it-works/",
20 'referral' => "https://plugins.longwatchstudio.com/kb/referral-sponsorship/",
21 'rewards' => "https://plugins.longwatchstudio.com/kb/points-on-cart/",
22 'past-orders' => "https://plugins.longwatchstudio.com/kb/process-past-orders/",
23 );
24
25 static function get($index=false, $escape = true)
26 {
27 if (!($index && isset(self::$doclinks[$index])))
28 $index = self::FALLBACK;
29 if ($escape)
30 return \esc_attr(self::$doclinks[$index]);
31 else
32 return self::$doclinks[$index];
33 }
34
35 static function toFields()
36 {
37 $fields = array();
38 $prefix = (__CLASS__ . ':');
39 foreach (self::$doclinks as $key => $url) {
40 $fields[$key] = array(
41 'id' => $prefix . $key,
42 'title' => $key,
43 'type' => 'custom',
44 'extra' => array(
45 'gizmo' => true,
46 'content' => sprintf('<a href="%s" target="_blank">%s</a>', \esc_attr($url), $url),
47 ),
48 );
49 }
50 return $fields;
51 }
52 }