Easy Video Player - Version 1.1.2

Version Description

  • Added translation option so the plugin can take advantage of language packs
Download this release

Release Info

Developer naa986
Plugin Icon 128x128 Easy Video Player
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

easy-video-player.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php
2
  /*
3
- Plugin Name: Easy Video Player
4
- Version: 1.1.1
5
- Plugin URI: http://noorsplugin.com/wordpress-video-plugin/
6
- Author: naa986
7
- Author URI: http://noorsplugin.com/
8
- Description: Easily embed videos into your WordPress blog
 
 
9
  */
10
 
11
  if (!defined('ABSPATH')) {
@@ -15,7 +17,7 @@ if (!class_exists('EASY_VIDEO_PLAYER')) {
15
 
16
  class EASY_VIDEO_PLAYER {
17
 
18
- var $plugin_version = '1.1.1';
19
 
20
  function __construct() {
21
  define('EASY_VIDEO_PLAYER_VERSION', $this->plugin_version);
@@ -26,8 +28,9 @@ if (!class_exists('EASY_VIDEO_PLAYER')) {
26
  if (is_admin()) {
27
  add_filter('plugin_action_links', array(&$this, 'easy_video_player_plugin_action_links'), 10, 2);
28
  }
 
29
  add_action('wp_enqueue_scripts', 'easy_video_player_enqueue_scripts');
30
- add_action('admin_menu', array(&$this, 'easy_video_player_add_options_menu'));
31
  add_action('wp_head', 'easy_video_player_header');
32
  add_shortcode('evp_embed_video', 'evp_embed_video_handler');
33
  //allows shortcode execution in the widget, excerpt and content
@@ -44,14 +47,19 @@ if (!class_exists('EASY_VIDEO_PLAYER')) {
44
 
45
  function easy_video_player_plugin_action_links($links, $file) {
46
  if ($file == plugin_basename(dirname(__FILE__) . '/easy-video-player.php')) {
47
- $links[] = '<a href="options-general.php?page=easy-video-player-settings">Settings</a>';
48
  }
49
  return $links;
50
  }
 
 
 
 
 
51
 
52
  function easy_video_player_add_options_menu() {
53
  if (is_admin()) {
54
- add_options_page('Easy Video Player Settings', 'Easy Video Player', 'manage_options', 'easy-video-player-settings', array(&$this, 'easy_video_player_options_page'));
55
  }
56
  add_action('admin_init', array(&$this, 'easy_video_player_add_settings'));
57
  }
@@ -61,37 +69,28 @@ if (!class_exists('EASY_VIDEO_PLAYER')) {
61
  }
62
 
63
  function easy_video_player_options_page() {
 
 
64
  ?>
65
  <div class="wrap">
66
- <div id="poststuff"><div id="post-body">
67
-
68
- <h2>Easy Video Player - v<?php echo $this->plugin_version; ?></h2>
69
- <div class="postbox">
70
- <h3><label for="title">Setup Guide</label></h3>
71
- <div class="inside">
72
- <p>For detailed documentation please visit the plugin homepage <a href="http://noorsplugin.com/wordpress-video-plugin/" target="_blank">here</a></p>
73
- </div></div>
74
- <div class="postbox">
75
- <h3><label for="title">General Settings</label></h3>
76
- <div class="inside">
77
- <form method="post" action="options.php">
78
- <?php settings_fields('easy-video-player-settings-group'); ?>
79
- <table class="form-table">
80
- <tr valign="top">
81
- <th scope="row">Enable jQuery</th>
82
- <td><input type="checkbox" id="evp_enable_jquery" name="evp_enable_jquery" value="1" <?php echo checked(1, get_option('evp_enable_jquery'), false) ?> />
83
- <p><i>By default this option should always be checked.</i></p>
84
- </td>
85
- </tr>
86
- </table>
87
-
88
- <p class="submit">
89
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
90
- </p>
91
- </form>
92
- </div></div>
93
-
94
- </div></div>
95
  </div>
96
  <?php
97
  }
1
  <?php
2
  /*
3
+ Plugin Name: Easy Video Player
4
+ Version: 1.1.2
5
+ Plugin URI: http://noorsplugin.com/wordpress-video-plugin/
6
+ Author: naa986
7
+ Author URI: http://noorsplugin.com/
8
+ Description: Easily embed videos into your WordPress blog
9
+ Text Domain: easy-video-player
10
+ Domain Path: /languages
11
  */
12
 
13
  if (!defined('ABSPATH')) {
17
 
18
  class EASY_VIDEO_PLAYER {
19
 
20
+ var $plugin_version = '1.1.2';
21
 
22
  function __construct() {
23
  define('EASY_VIDEO_PLAYER_VERSION', $this->plugin_version);
28
  if (is_admin()) {
29
  add_filter('plugin_action_links', array(&$this, 'easy_video_player_plugin_action_links'), 10, 2);
30
  }
31
+ add_action('plugins_loaded', array($this, 'plugins_loaded_handler'));
32
  add_action('wp_enqueue_scripts', 'easy_video_player_enqueue_scripts');
33
+ add_action('admin_menu', array($this, 'easy_video_player_add_options_menu'));
34
  add_action('wp_head', 'easy_video_player_header');
35
  add_shortcode('evp_embed_video', 'evp_embed_video_handler');
36
  //allows shortcode execution in the widget, excerpt and content
47
 
48
  function easy_video_player_plugin_action_links($links, $file) {
49
  if ($file == plugin_basename(dirname(__FILE__) . '/easy-video-player.php')) {
50
+ $links[] = '<a href="options-general.php?page=easy-video-player-settings">'.__('Settings', 'easy-video-player').'</a>';
51
  }
52
  return $links;
53
  }
54
+
55
+ function plugins_loaded_handler()
56
+ {
57
+ load_plugin_textdomain('easy-video-player', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
58
+ }
59
 
60
  function easy_video_player_add_options_menu() {
61
  if (is_admin()) {
62
+ add_options_page(__('Easy Video Player', 'easy-video-player'), __('Easy Video Player', 'easy-video-player'), 'manage_options', 'easy-video-player-settings', array($this, 'easy_video_player_options_page'));
63
  }
64
  add_action('admin_init', array(&$this, 'easy_video_player_add_settings'));
65
  }
69
  }
70
 
71
  function easy_video_player_options_page() {
72
+ $url = "http://noorsplugin.com/wordpress-video-plugin/";
73
+ $link_text = sprintf(wp_kses(__('For detailed documentation please visit the plugin homepage <a target="_blank" href="%s">here</a>.', 'easy-video-player'), array('a' => array('href' => array(), 'target' => array()))), esc_url($url));
74
  ?>
75
  <div class="wrap">
76
+ <h1>Easy Video Player - v<?php echo $this->plugin_version; ?></h1>
77
+ <div class="update-nag"><?php echo $link_text;?></div>
78
+ <h2 class="title"><?php _e('General Settings', 'easy-video-player')?></h2>
79
+ <form method="post" action="options.php">
80
+ <?php settings_fields('easy-video-player-settings-group'); ?>
81
+ <table class="form-table">
82
+ <tr valign="top">
83
+ <th scope="row"><?php _e('Enable jQuery', 'easy-video-player')?></th>
84
+ <td><input type="checkbox" id="evp_enable_jquery" name="evp_enable_jquery" value="1" <?php echo checked(1, get_option('evp_enable_jquery'), false) ?> />
85
+ <p><i><?php _e('By default this option should always be checked.', 'easy-video-player')?></i></p>
86
+ </td>
87
+ </tr>
88
+ </table>
89
+
90
+ <p class="submit">
91
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
92
+ </p>
93
+ </form>
 
 
 
 
 
 
 
 
 
 
 
94
  </div>
95
  <?php
96
  }
languages/easy-video-player.mo ADDED
Binary file
languages/easy-video-player.pot ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Easy Video Player\n"
4
+ "POT-Creation-Date: 2015-12-14 23:09+1000\n"
5
+ "PO-Revision-Date: 2015-12-14 23:09+1000\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.5.5\n"
12
+ "X-Poedit-KeywordsList: _e;__\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-SearchPath-0: .\n"
15
+
16
+ #: easy-video-player.php:50
17
+ msgid "Settings"
18
+ msgstr ""
19
+
20
+ #: easy-video-player.php:62
21
+ msgid "Easy Video Player"
22
+ msgstr ""
23
+
24
+ #: easy-video-player.php:73
25
+ #, php-format
26
+ msgid ""
27
+ "For detailed documentation please visit the plugin homepage <a target="
28
+ "\"_blank\" href=\"%s\">here</a>."
29
+ msgstr ""
30
+
31
+ #: easy-video-player.php:78
32
+ msgid "General Settings"
33
+ msgstr ""
34
+
35
+ #: easy-video-player.php:83
36
+ msgid "Enable jQuery"
37
+ msgstr ""
38
+
39
+ #: easy-video-player.php:85
40
+ msgid "By default this option should always be checked."
41
+ msgstr ""
42
+
43
+ #: easy-video-player.php:91
44
+ msgid "Save Changes"
45
+ msgstr ""
readme.txt CHANGED
@@ -3,16 +3,16 @@ Contributors: naa986
3
  Donate link: http://noorsplugin.com/
4
  Tags: video, wpvideo, flash, html5, iPad, iphone, ipod, mobile, playlists, embed video, flowplayer, video html5, flash player, player, video player
5
  Requires at least: 4.3
6
- Tested up to: 4.4
7
- Stable tag: 1.1.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- Easy Video Player allows you to embed videos into your WordPress site.
12
 
13
  == Description ==
14
 
15
- Easy Video Player is a user-friendly WordPress plugin to showcase your videos. You can embed both self-hosted videos or videos that are external hosted using direct links.
16
 
17
  = Easy Video Player Features =
18
 
@@ -29,11 +29,11 @@ Easy Video Player is a user-friendly WordPress plugin to showcase your videos. Y
29
 
30
  = Easy Video Player Plugin Usage =
31
 
32
- *Settings Configuration*
33
 
34
- It's pretty easy to set up this plugin. Once you have installed the plugin simply navigate to the Settings menu where you will be able to configure some options. Mostly you just to need check the "Enable jQuery" option. That will allow the plugin to make use of jQuery library.
35
 
36
- *Embedding Shortcodes for the Videos*
37
 
38
  Now it's time to finally embed a video shortcode. To do this create a new post/page and use the following shortcode:
39
 
@@ -41,13 +41,13 @@ Now it's time to finally embed a video shortcode. To do this create a new post/p
41
 
42
  here, url is a shortcode parameter that you need to replace the actual URL of the video file.
43
 
44
- *Video Autoplay*
45
 
46
  If you want a particular video to start playing when the page loads you can set the "autoplay" option to "true":
47
 
48
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" autoplay="true"]`
49
 
50
- *Control Size*
51
 
52
  By default, the player takes up the full width of the content area. You can easily control the size by specifying a width for it:
53
 
@@ -55,37 +55,41 @@ By default, the player takes up the full width of the content area. You can easi
55
 
56
  The height will be automatically determined based on the ratio (please see the "Control Player Ratio section" for details).
57
 
58
- *Control Player Ratio*
59
 
60
  The player ratio is set to "0.417" by default. But you can override it by specifying a different ratio in the shortcode:
61
 
62
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" ratio="0.345"]`
63
 
64
- *Control Player Skin*
65
 
66
  By default, the player uses the "minimalist" skin. But you can override it by specifying a different skin in the shortcode:
67
 
68
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" class="functional"]`
69
 
70
- *Video Loop*
71
 
72
  If you want a particular video to start playing again when it ends you can set the "loop" option to "true":
73
 
74
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" loop="true"]`
75
 
76
- *Video Muted*
77
 
78
  If you want a particular video to play without any audio output you can set the "muted" option to "true":
79
 
80
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" muted="true"]`
81
 
82
- *Video Player Template*
83
 
84
  If you want to use a different video player template you can specify it in the "template" parameter:
85
 
86
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" template="mediaelement"]`
87
 
88
- For detailed documentation please visit the [Easy Video Player](http://noorsplugin.com/wordpress-video-plugin/) plugin page
 
 
 
 
89
 
90
  = Recommended Reading =
91
 
@@ -128,6 +132,9 @@ none
128
 
129
  == Changelog ==
130
 
 
 
 
131
  = 1.1.1 =
132
  * Added a new shortcode parameter "muted" to disable the audio output of the video
133
 
3
  Donate link: http://noorsplugin.com/
4
  Tags: video, wpvideo, flash, html5, iPad, iphone, ipod, mobile, playlists, embed video, flowplayer, video html5, flash player, player, video player
5
  Requires at least: 4.3
6
+ Tested up to: 4.5
7
+ Stable tag: 1.1.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Easy Video Player is a WordPress video player that allows you to embed videos into your WordPress site.
12
 
13
  == Description ==
14
 
15
+ Easy Video Player is a user-friendly WordPress video plugin to showcase your videos. You can embed both self-hosted videos or videos that are external hosted using direct links.
16
 
17
  = Easy Video Player Features =
18
 
29
 
30
  = Easy Video Player Plugin Usage =
31
 
32
+ **Settings Configuration**
33
 
34
+ It's pretty easy to set up this video player plugin. Once you have installed the plugin simply navigate to the Settings menu where you will be able to configure some options. Mostly you just to need check the "Enable jQuery" option. That will allow the plugin to make use of jQuery library.
35
 
36
+ **Embedding Shortcodes for the Videos**
37
 
38
  Now it's time to finally embed a video shortcode. To do this create a new post/page and use the following shortcode:
39
 
41
 
42
  here, url is a shortcode parameter that you need to replace the actual URL of the video file.
43
 
44
+ **Video Autoplay**
45
 
46
  If you want a particular video to start playing when the page loads you can set the "autoplay" option to "true":
47
 
48
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" autoplay="true"]`
49
 
50
+ **Control Size**
51
 
52
  By default, the player takes up the full width of the content area. You can easily control the size by specifying a width for it:
53
 
55
 
56
  The height will be automatically determined based on the ratio (please see the "Control Player Ratio section" for details).
57
 
58
+ **Control Player Ratio**
59
 
60
  The player ratio is set to "0.417" by default. But you can override it by specifying a different ratio in the shortcode:
61
 
62
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" ratio="0.345"]`
63
 
64
+ **Control Player Skin**
65
 
66
  By default, the player uses the "minimalist" skin. But you can override it by specifying a different skin in the shortcode:
67
 
68
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" class="functional"]`
69
 
70
+ **Video Loop**
71
 
72
  If you want a particular video to start playing again when it ends you can set the "loop" option to "true":
73
 
74
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" loop="true"]`
75
 
76
+ **Video Muted**
77
 
78
  If you want a particular video to play without any audio output you can set the "muted" option to "true":
79
 
80
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" muted="true"]`
81
 
82
+ **Video Player Template**
83
 
84
  If you want to use a different video player template you can specify it in the "template" parameter:
85
 
86
  `[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" template="mediaelement"]`
87
 
88
+ For detailed documentation please visit the [Easy Video Player](http://noorsplugin.com/wordpress-video-plugin/ "Video Plugin for WordPress") plugin page
89
+
90
+ = Plugin Language Translation =
91
+
92
+ If you are a non-English speaker please help [translate Easy Video Player](https://translate.wordpress.org/projects/wp-plugins/easy-video-player) into your language.
93
 
94
  = Recommended Reading =
95
 
132
 
133
  == Changelog ==
134
 
135
+ = 1.1.2 =
136
+ * Added translation option so the plugin can take advantage of language packs
137
+
138
  = 1.1.1 =
139
  * Added a new shortcode parameter "muted" to disable the audio output of the video
140