-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
20 lines (18 loc) · 967 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/*
Plugin Name: Copy Activity Link
Description: Adds option to copy link of activity post under more options.
Version: 2.3
Author: Nmbrthirteen
Author URI: https://github.com/nmbrthirteen/
Plugin URI: https://github.com/nmbrthirteen/share-activity-link-buddyboss
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
defined('ABSPATH') || exit;
function custom_activity_options_scripts() {
wp_enqueue_style('custom-activity-options-style', plugin_dir_url(__FILE__) . '/main.css');
wp_enqueue_script('custom-activity-options', plugin_dir_url(__FILE__) . 'custom-activity-options.js', array('jquery'), '1.0.0', true);
wp_add_inline_script('custom-activity-options', 'var custom_activity_options = ' . wp_json_encode(array('activity_permalink' => trailingslashit(bp_get_root_domain() . '/' . bp_get_activity_root_slug()))), 'before');
}
add_action('wp_enqueue_scripts', 'custom_activity_options_scripts', 10);