Changeset 2161331
- Timestamp:
- 09/23/2019 11:16:20 AM (6 years ago)
- Location:
- pinpoll/trunk
- Files:
-
- 3 edited
-
pinpoll.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
tinymce/pinpoll_tinymce.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pinpoll/trunk/pinpoll.php
r2124147 r2161331 12 12 * Domain Path: /lang 13 13 * Description: Create fun polls & understand your audience! 14 * Version: 3.0.1 514 * Version: 3.0.16 15 15 * Min WP Version: 3.3.0 16 16 * Author: Pinpoll … … 67 67 add_action( 'wp_enqueue_scripts', array( $this, 'pinpoll_global' ) ); 68 68 //load localization vars to access in tinymce Editor 69 foreach ( array('post.php','post-new.php' ) as $hook ) {69 foreach ( array('post.php','post-new.php', 'user-new.php', 'user-edit.php') as $hook ) { 70 70 add_action( "admin_head-$hook", array( $this, 'pinpoll_tinyMCE_translation' ) ); 71 71 } -
pinpoll/trunk/readme.txt
r2124147 r2161331 177 177 * Improved error handling 178 178 * Fixed Edit-Poll Bug 179 180 = 3.0.16 = 181 * Fixed bug with third-party plugin -
pinpoll/trunk/tinymce/pinpoll_tinymce.js
r1507283 r2161331 12 12 tinymce.create('tinymce.plugins.PinpollButtons', { 13 13 init : function(editor, url) { 14 editor.addButton( 'pinpollButton', { 15 title : ppTinyMCETrans.insertText, 16 type : 'menubutton', 17 image : url + '/pinpoll_wp-icon.png', 18 tooltip : ppTinyMCETrans.insertText, 19 menu : [ 20 { 21 text : ppTinyMCETrans.quickInsertText, 22 onclick : function() { 23 editor.windowManager.open({ 24 title : ppTinyMCETrans.insertText, 25 body : [{ 26 type : 'textbox', 27 name : 'pollId', 28 label : ppTinyMCETrans.quickInsertLabel, 29 }], 30 onsubmit : function( e ) { 31 if(e.data.pollId !== '' && !isNaN(e.data.pollId)) { 32 editor.insertContent('[pinpoll id="' + e.data.pollId + '"]'); 14 if( ppTinyMCETrans ) { // only show button if the page is supported by the plugin (see pinpoll.php line 69 for supported pages) 15 editor.addButton( 'pinpollButton', { 16 title : ppTinyMCETrans.insertText, 17 type : 'menubutton', 18 image : url + '/pinpoll_wp-icon.png', 19 tooltip : ppTinyMCETrans.insertText, 20 menu : [ 21 { 22 text : ppTinyMCETrans.quickInsertText, 23 onclick : function() { 24 editor.windowManager.open({ 25 title : ppTinyMCETrans.insertText, 26 body : [{ 27 type : 'textbox', 28 name : 'pollId', 29 label : ppTinyMCETrans.quickInsertLabel, 30 }], 31 onsubmit : function( e ) { 32 if(e.data.pollId !== '' && !isNaN(e.data.pollId)) { 33 editor.insertContent('[pinpoll id="' + e.data.pollId + '"]'); 34 } 35 33 36 } 34 37 }); 38 } 39 }, 40 { 41 text : ppTinyMCETrans.selectPollText, 42 onclick : function( e ) { 43 editor.windowManager.open({ 44 title : ppTinyMCETrans.selectPollTitle, 45 file : url + '/pinpoll-tinymce-select-poll.php', 46 width: 500, 47 height: 300, 48 onsubmit : function( e ) { 49 editor.insertContent('[pinpoll id="' + e.data.testId+ '"]'); 50 }, 51 classes: 'pp-poll-container', 52 }, 53 { 54 editor : editor, 55 jquery : $, 56 url : url, 57 wpWindow : window, 35 58 } 36 }); 59 ); 60 } 37 61 } 38 }, 39 { 40 text : ppTinyMCETrans.selectPollText, 41 onclick : function( e ) { 42 editor.windowManager.open({ 43 title : ppTinyMCETrans.selectPollTitle, 44 file : url + '/pinpoll-tinymce-select-poll.php', 45 width: 500, 46 height: 300, 47 onsubmit : function( e ) { 48 editor.insertContent('[pinpoll id="' + e.data.testId+ '"]'); 49 }, 50 classes: 'pp-poll-container', 51 }, 52 { 53 editor : editor, 54 jquery : $, 55 url : url, 56 wpWindow : window, 57 } 58 ); 59 } 60 } 61 ] 62 }); 62 ] 63 }); 64 } 63 65 }, 64 66 createControl : function(n, cm) {
Note: See TracChangeset
for help on using the changeset viewer.