Plugin Directory

Changeset 2161331


Ignore:
Timestamp:
09/23/2019 11:16:20 AM (6 years ago)
Author:
pinpoll
Message:

Updated from GitHub

Location:
pinpoll/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pinpoll/trunk/pinpoll.php

    r2124147 r2161331  
    1212 * Domain Path: /lang
    1313 * Description: Create fun polls & understand your audience!
    14  * Version: 3.0.15
     14 * Version: 3.0.16
    1515 * Min WP Version: 3.3.0
    1616 * Author: Pinpoll
     
    6767      add_action( 'wp_enqueue_scripts', array( $this, 'pinpoll_global' ) );
    6868      //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 ) {
    7070        add_action( "admin_head-$hook", array( $this, 'pinpoll_tinyMCE_translation' ) );
    7171      }
  • pinpoll/trunk/readme.txt

    r2124147 r2161331  
    177177* Improved error handling
    178178* Fixed Edit-Poll Bug
     179
     180= 3.0.16 =
     181* Fixed bug with third-party plugin
  • pinpoll/trunk/tinymce/pinpoll_tinymce.js

    r1507283 r2161331  
    1212  tinymce.create('tinymce.plugins.PinpollButtons', {
    1313    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 
    3336                  }
    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,
    3558                }
    36               });
     59              );
     60              }
    3761            }
    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      }
    6365    },
    6466    createControl : function(n, cm) {
Note: See TracChangeset for help on using the changeset viewer.