User Profile Picture - Version 1.0.19

Version Description

  • Added support for 2.0.x version of Post Thumbnail Editor
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 User Profile Picture
Version 1.0.19
Comparing to
See all releases

Code changes from version 1.0.18 to 1.0.19

Files changed (3) hide show
  1. js/mpp.js +0 -4
  2. metronet-profile-picture.php +5 -18
  3. readme.txt +9 -2
js/mpp.js CHANGED
@@ -70,8 +70,4 @@ jQuery( document ).ready( function( $ ) {
70
  return false;
71
  });
72
 
73
- //For when Thickbox is closed - Trac - http://core.trac.wordpress.org/ticket/19189#comment:24
74
- $(document).on('tb_unload', '#TB_window', function(e){
75
- mt_ajax_thumbnail_refresh();
76
- });
77
  } );
70
  return false;
71
  });
72
 
 
 
 
 
73
  } );
metronet-profile-picture.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Metronet Profile Picture
4
  Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
5
  Description: Use the native WP uploader on your user profile page.
6
  Author: Metronet
7
- Version: 1.0.18
8
  Requires at least: 3.5
9
  Author URI: http://www.metronet.no
10
  Contributors: ronalfy, metronet
@@ -220,16 +220,11 @@ class Metronet_Profile_Picture {
220
  if ( has_post_thumbnail( $post_id ) && defined( 'PTE_VERSION' ) ) {
221
  //Post Thumbnail Editor compatibility - http://wordpress.org/extend/plugins/post-thumbnail-editor/
222
  $post_thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );
223
- $pte_options = pte_get_options();
224
  $pte_url = add_query_arg( array(
225
- 'action' => 'pte_ajax',
226
- 'pte-action' => 'launch',
227
- 'id' => $post_thumbnail_id,
228
- 'TB_iframe' => 'true',
229
- 'height' => $pte_options[ 'pte_tb_height' ],
230
- 'width' => $pte_options[ 'pte_tb_width' ]
231
- ), admin_url('admin-ajax.php') );
232
- printf( ' - <a class="thickbox" href="%s">%s</a>', $pte_url, __( 'Crop Thumbnail', 'metronet_profile_picture' ) );
233
  } //end post thumbnail editor
234
  return ob_get_clean();
235
  } //end get_post_thumbnail_editor_link
@@ -336,10 +331,6 @@ class Metronet_Profile_Picture {
336
  wp_enqueue_media( array( 'post' => $post_id ) );
337
 
338
  $script_deps = array( 'media-editor' );
339
- if ( defined( 'PTE_VERSION' ) ) {
340
- //Post Thumbnail Editor compatibility - http://wordpress.org/extend/plugins/post-thumbnail-editor/
341
- $script_deps[] = 'thickbox';
342
- }
343
  wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '1.0.17', true );
344
  wp_localize_script( 'mt-pp', 'metronet_profile_image',
345
  array(
@@ -350,10 +341,6 @@ class Metronet_Profile_Picture {
350
  } //end print_media_scripts
351
 
352
  public function print_media_styles() {
353
- if ( defined( 'PTE_VERSION' ) ) {
354
- //Post Thumbnail Editor compatibility - http://wordpress.org/extend/plugins/post-thumbnail-editor/
355
- wp_enqueue_style( 'thickbox' );
356
- }
357
  } //end print_media_styles
358
 
359
  /**
4
  Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
5
  Description: Use the native WP uploader on your user profile page.
6
  Author: Metronet
7
+ Version: 1.0.19
8
  Requires at least: 3.5
9
  Author URI: http://www.metronet.no
10
  Contributors: ronalfy, metronet
220
  if ( has_post_thumbnail( $post_id ) && defined( 'PTE_VERSION' ) ) {
221
  //Post Thumbnail Editor compatibility - http://wordpress.org/extend/plugins/post-thumbnail-editor/
222
  $post_thumbnail_id = get_post_meta( $post_id, '_thumbnail_id', true );
 
223
  $pte_url = add_query_arg( array(
224
+ 'page' => 'pte-edit',
225
+ 'pte-id' => $post_thumbnail_id
226
+ ), admin_url('upload.php') );
227
+ printf( ' - <a href="%s">%s</a>', $pte_url, __( 'Crop Thumbnail', 'metronet_profile_picture' ) );
 
 
 
 
228
  } //end post thumbnail editor
229
  return ob_get_clean();
230
  } //end get_post_thumbnail_editor_link
331
  wp_enqueue_media( array( 'post' => $post_id ) );
332
 
333
  $script_deps = array( 'media-editor' );
 
 
 
 
334
  wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '1.0.17', true );
335
  wp_localize_script( 'mt-pp', 'metronet_profile_image',
336
  array(
341
  } //end print_media_scripts
342
 
343
  public function print_media_styles() {
 
 
 
 
344
  } //end print_media_styles
345
 
346
  /**
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: metronet, ronalfy
3
  Tags: users, user, user profile
4
  Requires at least: 3.5
5
- Tested up to: 3.5
6
- Stable tag: 1.0.18
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -93,6 +93,9 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
93
  3. Post Thumbnail Editor compatibility.
94
 
95
  == Changelog ==
 
 
 
96
  = 1.0.18 =
97
  * Added basic multisite support
98
 
@@ -126,6 +129,10 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
126
  * Initial release.
127
 
128
  == Upgrade Notice ==
 
 
 
 
129
  = 1.0.18 =
130
  Added basic multisite support
131
 
2
  Contributors: metronet, ronalfy
3
  Tags: users, user, user profile
4
  Requires at least: 3.5
5
+ Tested up to: 3.6
6
+ Stable tag: 1.0.19
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
93
  3. Post Thumbnail Editor compatibility.
94
 
95
  == Changelog ==
96
+ = 1.0.19 =
97
+ * Added support for 2.0.x version of <a href='http://wordpress.org/extend/plugins/post-thumbnail-editor/'>Post Thumbnail Editor</a>
98
+
99
  = 1.0.18 =
100
  * Added basic multisite support
101
 
129
  * Initial release.
130
 
131
  == Upgrade Notice ==
132
+
133
+ = 1.0.19 =
134
+ Added support for version 2.0.x of Post Thumbnail Editor
135
+
136
  = 1.0.18 =
137
  Added basic multisite support
138