forked from rtCamp/transcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrt-transcoder.php
More file actions
87 lines (75 loc) · 2.39 KB
/
rt-transcoder.php
File metadata and controls
87 lines (75 loc) · 2.39 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
/**
* Plugin Name: Transcoder
* Plugin URI: https://rtmedia.io/transcoder/?utm_source=dashboard&utm_medium=plugin&utm_campaign=transcoder
* Description: Audio & video transcoding services for ANY WordPress website. Allows you to convert audio/video files of any format to a web-friendly format (mp3/mp4).
* Version: 1.2
* Text Domain: transcoder
* Author: rtCamp
* Author URI: https://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=transcoder
* Domain Path: /languages/
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*
* @package Transcoder
*/
if ( ! defined( 'RT_TRANSCODER_PATH' ) ) {
/**
* The server file system path to the plugin directory
*/
define( 'RT_TRANSCODER_PATH', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'RT_TRANSCODER_URL' ) ) {
/**
* The url to the plugin directory
*/
define( 'RT_TRANSCODER_URL', plugin_dir_url( __FILE__ ) );
}
if ( ! defined( 'RT_TRANSCODER_BASE_NAME' ) ) {
/**
* The base name of the plugin directory
*/
define( 'RT_TRANSCODER_BASE_NAME', plugin_basename( __FILE__ ) );
}
if ( ! defined( 'RT_TRANSCODER_VERSION' ) ) {
/**
* The version of the plugin
*/
define( 'RT_TRANSCODER_VERSION', '1.2' );
}
require_once RT_TRANSCODER_PATH . 'admin/rt-transcoder-functions.php';
require_once RT_TRANSCODER_PATH . 'admin/rt-transcoder-admin.php';
global $rt_transcoder_admin;
$rt_transcoder_admin = new RT_Transcoder_Admin();
/**
* Add Settings/Docs link to plugins area.
*
* @since 1.1.2
*
* @param array $links Links array in which we would prepend our link.
* @param string $file Current plugin basename.
*
* @return array Processed links.
*/
function rtt_action_links( $links, $file ) {
// Return normal links if not plugin.
if ( plugin_basename( 'transcoder/rt-transcoder.php' ) !== $file ) {
return $links;
}
// Add a few links to the existing links array.
$settings_url = sprintf(
'<a href="%1$s">%2$s</a>',
esc_url( admin_url( 'admin.php?page=rt-transcoder' ) ),
esc_html__( 'Settings', 'transcoder' )
);
$docs_url = sprintf(
'<a target="_blank" href="https://rtmedia.io/docs/transcoder/">%1$s</a>',
esc_html__( 'Docs', 'transcoder' )
);
return array_merge( $links, array(
'settings' => $settings_url,
'docs' => $docs_url,
) );
}
add_filter( 'plugin_action_links', 'rtt_action_links', 11, 2 );
add_filter( 'network_admin_plugin_action_links', 'rtt_action_links', 11, 2 );