-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtcamp.php
54 lines (49 loc) · 1.36 KB
/
rtcamp.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
<?php
/*
* Plugin Name: rtCamp
* Plugin URI: github link
* Description: we give you functionality to swipe
* Version: 1.0.0
* Author: Omisha
* Author URI: github link
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
if (!class_exists('learnwp')):
final class learnwp {
private static $instance =null;
private function __construct() {
$this->initializeHooks();
}
public static function getInstance()
{
if (is_null(self::$instance)) {
self::$instance = new self();
return self::$instance;
}
}
private function initializeHooks() {
require plugin_dir_path( __FILE__ ) .'menu.php';
require plugin_dir_path( __FILE__ ) .'shortcodes.php';
add_action('admin_bar_menu', 'add_own_menu');
add_filter('admin_footer_text', 'custom_fiiter_string');
add_shortcode( 'weather', array('weatherized','weatherShortcode'));
}
}
endif;
function custom_fiiter_string($text) {
return '<p style="color: blue"> A product of DAIICT </p>' . $text;
}
learnwp::getInstance();
function add_own_menu() {
global $wp_admin_bar;
$custom_menu= array(
'id' => 'Omisha',
'title' => 'Omisha',
'parent' => 'top-secondary',
'href'=> site_url()
);
$wp_admin_bar->add_node($custom_menu);
}
?>