Changeset 496741
- Timestamp:
- 01/29/2012 05:20:14 AM (14 years ago)
- File:
-
- 1 edited
-
ra-fb-like-box/trunk/ra_fb_like_box.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ra-fb-like-box/trunk/ra_fb_like_box.php
r496538 r496741 26 26 add_action("admin_menu", array("RAFacebookLikeBox", "ra_fb_likebox_options")); 27 27 add_shortcode("rashid_fb_lb", array("RAFacebookLikeBox", "ra_fb_likebox_sc")); 28 29 add_filter('plugin_row_meta', array("RAFacebookLikeBox", "ra_fb_plugin_row_meta"), 10, 2); 28 30 29 31 class RAFacebookLikeBox { … … 61 63 62 64 return $_ra_options; 65 } 66 67 static function ra_plugin_basename($file = __FILE__) { 68 $file = str_replace('\\','/',$file); // sanitize for Win32 installs 69 $file = preg_replace('|/+|','/', $file); // remove any duplicate slash 70 $plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR); // sanitize for Win32 installs 71 $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash 72 $mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs 73 $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash 74 $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir 75 $file = trim($file, '/'); 76 return $file; 63 77 } 64 78 … … 238 252 } 239 253 254 static function ra_fb_plugin_row_meta($meta, $file) { 255 if ($file == self::ra_plugin_basename()) { 256 $meta[] = '<a href="options-general.php?page=ra_fb_likebox">' . __('Settings') . '</a>'; 257 $meta[] = '<a href="http://blog.ecafechat.com/donations/" target="_blank">' . __('Donate') . '</a>'; 258 } 259 return $meta; 260 } 261 240 262 static function ra_fb_like_init(){ 241 263 wp_register_sidebar_widget(__('ra-fb-lb'), __('Rashid\'s Facebook Like Box'), array('RAFacebookLikeBox', 'ra_fb_likebox_widget'));
Note: See TracChangeset
for help on using the changeset viewer.