Embed PDF - Version 1.03

Version Description

  • Automatically enable auto-embeds on plugin activation
Download this release

Release Info

Developer pathawks
Plugin Icon wp plugin Embed PDF
Version 1.03
Comparing to
See all releases

Code changes from version 1.02 to 1.03

Files changed (2) hide show
  1. embed.php +10 -3
  2. readme.txt +14 -3
embed.php CHANGED
@@ -3,11 +3,12 @@
3
  Plugin Name: DirtySuds - Embed PDF
4
  Plugin URI: http://dirtysuds.com
5
  Description: Embed a PDF using Google Docs Viewer
6
- Author: Pat Hawks
7
- Version: 1.02
8
- Author URI: http://www.pathawks.com
9
 
10
  Updates:
 
11
  1.02 20110315 - Added support for `gdoc` shortcode
12
  1.01 20110303 - Added support for class and ID attributes
13
  1.00 20110224 - First Version
@@ -29,10 +30,16 @@ Updates:
29
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
  */
31
 
 
 
32
  wp_embed_register_handler( 'pdf', '#(^(http|wpurl)\:\/\/.+\.pdf$)#i', 'dirtysuds_embed_pdf' );
33
  add_shortcode( 'gdoc', 'dirtysuds_embed_pdf' );
34
  add_filter('plugin_row_meta', 'dirtysuds_embed_pdf_rate',10,2);
35
 
 
 
 
 
36
  function dirtysuds_embed_pdf( $matches, $atts, $url, $rawattr=null ) {
37
  extract( shortcode_atts( array(
38
  'height' => get_option('embed_size_h'),
3
  Plugin Name: DirtySuds - Embed PDF
4
  Plugin URI: http://dirtysuds.com
5
  Description: Embed a PDF using Google Docs Viewer
6
+ Author: Dirty Suds
7
+ Version: 1.03
8
+ Author URI: http://blog.dirtysuds.com
9
 
10
  Updates:
11
+ 1.03 20110321 - Automatically enable auto-embeds on activation
12
  1.02 20110315 - Added support for `gdoc` shortcode
13
  1.01 20110303 - Added support for class and ID attributes
14
  1.00 20110224 - First Version
30
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
  */
32
 
33
+
34
+ register_activation_hook( __FILE__, 'dirtysuds_embed_pdf_enable_embeds' );
35
  wp_embed_register_handler( 'pdf', '#(^(http|wpurl)\:\/\/.+\.pdf$)#i', 'dirtysuds_embed_pdf' );
36
  add_shortcode( 'gdoc', 'dirtysuds_embed_pdf' );
37
  add_filter('plugin_row_meta', 'dirtysuds_embed_pdf_rate',10,2);
38
 
39
+ function dirtysuds_embed_pdf_enable_embeds() {
40
+ update_option('embed_autourls',1);
41
+ }
42
+
43
  function dirtysuds_embed_pdf( $matches, $atts, $url, $rawattr=null ) {
44
  extract( shortcode_atts( array(
45
  'height' => get_option('embed_size_h'),
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dirtysuds, pathawks
3
  Donate link: http://www.pathawks.com/p/wordpress-plugins.html
4
  Tags: plugins, wordpress, embed, eombed, pdf, google, Google Docs, shortcode
5
  Requires at least: 2.9
6
- Tested up to: 3.1
7
- Stable tag: 1.02
8
 
9
  Adds pseudo oembed support for PDF documents
10
 
@@ -25,14 +25,25 @@ Supported attributes in the embed tag are `class` `id` `title` `height` and `wid
25
 
26
  == Frequently Asked Questions ==
27
 
 
 
 
 
 
 
 
 
28
  = I have an idea for a great way to improve this plugin =
29
 
30
  Great! I'd love to hear from you.
31
- embedPDF@pathawks.com
32
 
33
 
34
  == Changelog ==
35
 
 
 
 
36
  = 1.02 =
37
  * Added support for `gdoc` shortcode for compatibility with older plugins
38
 
3
  Donate link: http://www.pathawks.com/p/wordpress-plugins.html
4
  Tags: plugins, wordpress, embed, eombed, pdf, google, Google Docs, shortcode
5
  Requires at least: 2.9
6
+ Tested up to: 3.1.2
7
+ Stable tag: 1.03
8
 
9
  Adds pseudo oembed support for PDF documents
10
 
25
 
26
  == Frequently Asked Questions ==
27
 
28
+ = How can I change the size of the PDF viewer? =
29
+
30
+ If you want to change the default size of media embedded in a post, that can be done in the admin interface under *Settings ⇒ Media Settings ⇒ Embeds*
31
+
32
+ If you'd just like to change the size of one instance, you can use the standard attributes of the WordPress embed shortcode.
33
+
34
+ `[embed width="400" height="600"]http://example.com/document.pdf[/embed]`
35
+
36
  = I have an idea for a great way to improve this plugin =
37
 
38
  Great! I'd love to hear from you.
39
+ plugins@dirtysuds.com
40
 
41
 
42
  == Changelog ==
43
 
44
+ = 1.03 =
45
+ * Automatically enable auto-embeds on plugin activation
46
+
47
  = 1.02 =
48
  * Added support for `gdoc` shortcode for compatibility with older plugins
49