Version Description
- Maintenance: Removed dashboard widget
Download this release
Release Info
Developer | dartiss |
Plugin | YouTube Embed |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.4.1
- images/Thumbs.db +0 -0
- includes/artiss-dashboard-widget.php +0 -127
- readme.txt +8 -3
- youtube-embed.php +2 -8
images/Thumbs.db
DELETED
Binary file
|
includes/artiss-dashboard-widget.php
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Artiss Dashboard Widget (v1.4)
|
4 |
-
*
|
5 |
-
* Add a box to the dashboard to display Artiss posts, and plugin news and support links
|
6 |
-
*
|
7 |
-
* @package YouTubeEmbed
|
8 |
-
* @since 2.0
|
9 |
-
*/
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Define Dashboard Widget
|
13 |
-
*
|
14 |
-
* Set up a new dashboard widget
|
15 |
-
*
|
16 |
-
*/
|
17 |
-
|
18 |
-
function artiss_dashboard_widget() {
|
19 |
-
global $wp_meta_boxes;
|
20 |
-
wp_add_dashboard_widget( 'artiss_help_widget', 'Artiss News & Support', 'adw_create_widget' );
|
21 |
-
}
|
22 |
-
add_action( 'wp_dashboard_setup', 'artiss_dashboard_widget' );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Display Dashboard Widget
|
26 |
-
*
|
27 |
-
* Show dashboard widget. Fetch top news items from Twitter cache them.
|
28 |
-
*
|
29 |
-
*/
|
30 |
-
|
31 |
-
function adw_create_widget() {
|
32 |
-
|
33 |
-
// Set number of minutes to cache output
|
34 |
-
$minutes_to_cache = 120;
|
35 |
-
|
36 |
-
// Set number of news items to display
|
37 |
-
$news_items = 5; // Attempt to get the cache
|
38 |
-
$output = get_transient( 'artiss_dashboard_text' );
|
39 |
-
|
40 |
-
// No cache found
|
41 |
-
if (!$output) {
|
42 |
-
|
43 |
-
// Add donation link
|
44 |
-
$output .= "<span style=\"font-size: 0.8em; float: right\"><a href=\"http://www.artiss.co.uk/donate\">Donate</a></span>";
|
45 |
-
|
46 |
-
// News heading
|
47 |
-
$output .= "<span style=\"font-size: 1.1em; font-weight: bold;\">Latest News</span><br/>\n";
|
48 |
-
|
49 |
-
// Fetch the Twitter status'
|
50 |
-
$file_return = adw_get_file( 'http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=artiss_tech&count=' . $news_items . '&exclude_replies=true' );
|
51 |
-
|
52 |
-
if ( $file_return[ 'file' ] != '' ) {
|
53 |
-
|
54 |
-
// Extract Twitter status' and output
|
55 |
-
|
56 |
-
$twitter_feed = $file_return[ 'file' ];
|
57 |
-
|
58 |
-
$output .= "<span style=\"font-weight: bold; font-size: 0.8em;\">Last updated " . date('l jS F \a\t g:ia') . ".</span><br/>\n<ul>\n";
|
59 |
-
|
60 |
-
$loop = 1;
|
61 |
-
$pos = 1;
|
62 |
-
while ( $loop < ( $news_items + 1 ) ) {
|
63 |
-
|
64 |
-
$start = strpos( $twitter_feed, '<text>', $pos );
|
65 |
-
$end = strpos( $twitter_feed, '</text>', $start );
|
66 |
-
|
67 |
-
// Extract status
|
68 |
-
$status = substr( $twitter_feed, $start + 6, $end - $start - 6 );
|
69 |
-
|
70 |
-
// Remove new post suffix
|
71 |
-
$pos = strpos( $status, ': ' );
|
72 |
-
if ( $pos !== false ) {
|
73 |
-
$prefix = substr( $status, 0, $pos + 1 );
|
74 |
-
$status = str_replace( 'New blog post: ', '', $status );
|
75 |
-
}
|
76 |
-
|
77 |
-
// Remove hashtags
|
78 |
-
$status = rtrim( preg_replace( '/#[^\s]+\s?/', '', $status ) );
|
79 |
-
|
80 |
-
// Add URL links
|
81 |
-
$status = ereg_replace( "[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $status );
|
82 |
-
|
83 |
-
$output .= '<li>' . $status . "</li>\n";
|
84 |
-
|
85 |
-
$pos = $end+7;
|
86 |
-
$loop ++;
|
87 |
-
}
|
88 |
-
$output .= "</ul>\n";
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
// Add link to Twitter
|
93 |
-
$output .= "<p><a href=\"http://twitter.com/artiss_tech\">Follow us on Twitter</a></p>\n";
|
94 |
-
|
95 |
-
// Generate support links
|
96 |
-
$output .= "<span style=\"font-size: 1.1em; font-weight: bold;\">Support Links</span><br/>\n<ul>\n<li><a href=\"http://www.artiss.co.uk\">Artiss.co.uk website</a><br/></li>\n<li><a href=\"http://www.artiss.co.uk/wp-plugins\">Main plugin page</a><br/></li>\n<li><a href=\"http://www.artiss.co.uk/forum\">Plugin forum </a></li>\n</ul>\n";
|
97 |
-
|
98 |
-
// Update cache
|
99 |
-
set_transient( 'artiss_dashboard_text', $output, $minutes_to_cache * 60 );
|
100 |
-
}
|
101 |
-
|
102 |
-
echo $output;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Fetch a file (1.5)
|
107 |
-
* Use WordPress API to fetch a file and check results
|
108 |
-
*
|
109 |
-
* @package [Plugin Name]
|
110 |
-
* @since [version number]
|
111 |
-
*
|
112 |
-
* @param string $filein File name to fetch
|
113 |
-
* @return string Array containing file contents and response
|
114 |
-
*/
|
115 |
-
|
116 |
-
function adw_get_file( $filein ) {
|
117 |
-
|
118 |
-
$fileout = wp_remote_get( $filein );
|
119 |
-
if ( !is_wp_error( $response ) ) {
|
120 |
-
if ( isset( $fileout[ 'body' ] ) ) { $file_return[ 'file' ] = $fileout[ 'body' ]; }
|
121 |
-
if ( isset( $fileout[ 'response '][ 'code' ] ) ) { $file_return[ 'response' ] = $fileout[ 'response' ][ 'code' ]; }
|
122 |
-
}
|
123 |
-
|
124 |
-
return $file_return;
|
125 |
-
|
126 |
-
}
|
127 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dartiss
|
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, sidebar, simple, smart, url, valid, video, widget, width, xhtml, youtube, youtuber
|
5 |
Requires at least: 2.9
|
6 |
-
Tested up to: 3.3
|
7 |
-
Stable tag: 2.4
|
8 |
|
9 |
A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
|
10 |
|
@@ -393,8 +393,10 @@ That's correct - all Artiss plugins will now add this feature to keep you up-to-
|
|
393 |
|
394 |
== Changelog ==
|
395 |
|
396 |
-
= 2.4 =
|
|
|
397 |
|
|
|
398 |
* Maintenance: Re-sequenced the changelog in the README
|
399 |
* Maintenance: Removed drop shadow option
|
400 |
* Maintenance: Re-design of widgets, reducing number of parameters down to make it easier to use - use profiles to modify missing parameters
|
@@ -533,6 +535,9 @@ That's correct - all Artiss plugins will now add this feature to keep you up-to-
|
|
533 |
|
534 |
== Upgrade Notice ==
|
535 |
|
|
|
|
|
|
|
536 |
= 2.4 =
|
537 |
* Numerous improvements, including new option for responsive video output
|
538 |
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, sidebar, simple, smart, url, valid, video, widget, width, xhtml, youtube, youtuber
|
5 |
Requires at least: 2.9
|
6 |
+
Tested up to: 3.3.1
|
7 |
+
Stable tag: 2.4.1
|
8 |
|
9 |
A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
|
10 |
|
393 |
|
394 |
== Changelog ==
|
395 |
|
396 |
+
= 2.4.1 =
|
397 |
+
* Maintenance: Removed dashboard widget
|
398 |
|
399 |
+
= 2.4 =
|
400 |
* Maintenance: Re-sequenced the changelog in the README
|
401 |
* Maintenance: Removed drop shadow option
|
402 |
* Maintenance: Re-design of widgets, reducing number of parameters down to make it easier to use - use profiles to modify missing parameters
|
535 |
|
536 |
== Upgrade Notice ==
|
537 |
|
538 |
+
= 2.4.1 =
|
539 |
+
* Updrade to remove the dashboard widget
|
540 |
+
|
541 |
= 2.4 =
|
542 |
* Numerous improvements, including new option for responsive video output
|
543 |
|
youtube-embed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Artiss YouTube Embed
|
4 |
Plugin URI: http://www.artiss.co.uk/artiss-youtube-embed
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
-
Version: 2.4
|
7 |
Author: David Artiss
|
8 |
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
@@ -17,7 +17,7 @@ Author URI: http://www.artiss.co.uk
|
|
17 |
* @since 2.0
|
18 |
*/
|
19 |
|
20 |
-
define( 'youtube_embed_version', '2.4' );
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|
@@ -39,12 +39,6 @@ if ( is_admin() ) {
|
|
39 |
|
40 |
include_once( $functions_dir . 'mcebutton.php' ); // Editor button
|
41 |
|
42 |
-
if ( !has_action( 'wp_dashboard_setup', 'artiss_dashboard_widget' ) ) {
|
43 |
-
|
44 |
-
include_once( $functions_dir . 'artiss-dashboard-widget.php' ); // Artiss dashboard widget
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
} else {
|
49 |
|
50 |
include_once( $functions_dir . 'content.php' ); // Process post content
|
3 |
Plugin Name: Artiss YouTube Embed
|
4 |
Plugin URI: http://www.artiss.co.uk/artiss-youtube-embed
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
+
Version: 2.4.1
|
7 |
Author: David Artiss
|
8 |
Author URI: http://www.artiss.co.uk
|
9 |
*/
|
17 |
* @since 2.0
|
18 |
*/
|
19 |
|
20 |
+
define( 'youtube_embed_version', '2.4.1' );
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|
39 |
|
40 |
include_once( $functions_dir . 'mcebutton.php' ); // Editor button
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
} else {
|
43 |
|
44 |
include_once( $functions_dir . 'content.php' ); // Process post content
|