Plugin Directory

Changeset 1376499


Ignore:
Timestamp:
03/22/2016 05:48:24 PM (10 years ago)
Author:
DobsonDev
Message:

Tagging version 2.0.1

Location:
dobsondev-shortcodes
Files:
7 edited
12 copied

Legend:

Unmodified
Added
Removed
  • dobsondev-shortcodes/tags/2.0.1/changelog.txt

    r1290205 r1376499  
    33New Features
    44
     5* Added a shortcode (divClear) that provides a <div> with clear: both; (2.0.1)
    56* Added a TinyMCE Plugin that provides a user interface for the shortcodes. Click on the DobsonDev Shortcodes button in the TinyMCE editor will produce a dropdown with all of the available shortcodes you can use, simply click on the shortcode you want and a popup with the available attributes will appear. Fill them out and the shortcode will appear in the editor completed. (2.0.0)
    67* Updated Font Awesome to 4.4.0 (2.0.0)
     
    89Bug Fixes
    910
     11* Fixed a bug where other Font Awesome usages could be affected by this plugin's CSS (2.0.1)
    1012* Tested up to WordPress 4.4 (2.0.0)
    1113* Fixed a bug where not all of the CSS and JavaScript files were minified (2.0.0)
  • dobsondev-shortcodes/tags/2.0.1/css/dobsondev-shortcodes.css

    r1290205 r1376499  
    142142}
    143143/* Required for FontAwesome icons to work properly in TinyMCE */
    144 i.fa {
     144i.fa.dobsondev-shortcodes {
    145145  font: 400 20px/1 FontAwesome !important;
    146146  padding: 0;
     
    153153}
    154154/* Required for Dashicons to work properly in TinyMCE */
    155 i.mce-i-icon {
     155i.mce-i-icon.dobsondev-shortcodes {
    156156  font: 400 20px/1 dashicons;
    157157  padding: 0;
  • dobsondev-shortcodes/tags/2.0.1/css/dobsondev-shortcodes.min.css

    r1290205 r1376499  
    1 div.dobdev-youtube-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}div.dobdev-youtube-container iframe,div.dobdev-youtube-container object,div.dobdev-youtube-container embed{position:absolute;top:0;left:0;width:100%;height:100%}code.dobdev-code-inline{font-family:monospace,monospace;font-size:1em}pre.dobdev-code-block{background:none repeat scroll 0 0 #111;color:#EEE;border-radius:3px 3px 3px 3px;padding:8px 8px 8px 5px}a.dobdev-red-button{display:inline-block;background:#D11 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #D11;color:#FFF;text-decoration:none}a.dobdev-red-button:hover{background:#FFF none no-repeat right top;color:#D11}a.dobdev-blue-button{display:inline-block;width:auto;background:#09F none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #09F;color:#FFF;text-decoration:none}a.dobdev-blue-button:hover{background:#FFF none no-repeat right top;color:#09F}a.dobdev-green-button{display:inline-block;background:#090 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #090;color:#FFF;text-decoration:none}a.dobdev-green-button:hover{background:#FFF none no-repeat right top;color:#090}a.dobdev-orange-button{display:inline-block;background:#F70 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #F70;color:#FFF;text-decoration:none}a.dobdev-orange-button:hover{background:#FFF none no-repeat right top;color:#F70}a.dobdev-purple-button{display:inline-block;background:#909 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #909;color:#FFF;text-decoration:none}a.dobdev-purple-button:hover{background:#FFF none no-repeat right top;color:#909}a.dobdev-turquoise-button{display:inline-block;background:#099 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #099;color:#FFF;text-decoration:none}a.dobdev-turquoise-button:hover{background:#FFF none no-repeat right top;color:#099}div.dobdev-info-msg,div.dobdev-success-msg,div.dobdev-warning-msg,div.dobdev-error-msg{margin:10px 0;padding:10px;border-radius:3px 3px 3px 3px}div.dobdev-info-msg{color:#059;background-color:#BEF}div.dobdev-success-msg{color:#270;background-color:#DFF2BF}div.dobdev-warning-msg{color:#9F6000;background-color:#FEEFB3}div.dobdev-error-msg{color:#D8000C;background-color:#FFBABA}div.dobdev-related-posts-post{display:none}div.dobdev-related-posts-post a{text-decoration:none}i.dobsondev-icon{background-image:url(../res/imgs/dd-shortcodes.png)}i.fa{font:400 20px/1 FontAwesome!important;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}i.mce-i-icon{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}
     1div.dobdev-youtube-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}div.dobdev-youtube-container iframe,div.dobdev-youtube-container object,div.dobdev-youtube-container embed{position:absolute;top:0;left:0;width:100%;height:100%}code.dobdev-code-inline{font-family:monospace,monospace;font-size:1em}pre.dobdev-code-block{background:none repeat scroll 0 0 #111;color:#EEE;border-radius:3px 3px 3px 3px;padding:8px 8px 8px 5px}a.dobdev-red-button{display:inline-block;background:#D11 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #D11;color:#FFF;text-decoration:none}a.dobdev-red-button:hover{background:#FFF none no-repeat right top;color:#D11}a.dobdev-blue-button{display:inline-block;width:auto;background:#09F none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #09F;color:#FFF;text-decoration:none}a.dobdev-blue-button:hover{background:#FFF none no-repeat right top;color:#09F}a.dobdev-green-button{display:inline-block;background:#090 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #090;color:#FFF;text-decoration:none}a.dobdev-green-button:hover{background:#FFF none no-repeat right top;color:#090}a.dobdev-orange-button{display:inline-block;background:#F70 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #F70;color:#FFF;text-decoration:none}a.dobdev-orange-button:hover{background:#FFF none no-repeat right top;color:#F70}a.dobdev-purple-button{display:inline-block;background:#909 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #909;color:#FFF;text-decoration:none}a.dobdev-purple-button:hover{background:#FFF none no-repeat right top;color:#909}a.dobdev-turquoise-button{display:inline-block;background:#099 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #099;color:#FFF;text-decoration:none}a.dobdev-turquoise-button:hover{background:#FFF none no-repeat right top;color:#099}div.dobdev-info-msg,div.dobdev-success-msg,div.dobdev-warning-msg,div.dobdev-error-msg{margin:10px 0;padding:10px;border-radius:3px 3px 3px 3px}div.dobdev-info-msg{color:#059;background-color:#BEF}div.dobdev-success-msg{color:#270;background-color:#DFF2BF}div.dobdev-warning-msg{color:#9F6000;background-color:#FEEFB3}div.dobdev-error-msg{color:#D8000C;background-color:#FFBABA}div.dobdev-related-posts-post{display:none}div.dobdev-related-posts-post a{text-decoration:none}i.dobsondev-icon{background-image:url(../res/imgs/dd-shortcodes.png)}i.fa.dobsondev-shortcodes{font:400 20px/1 FontAwesome!important;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}i.mce-i-icon.dobsondev-shortcodes{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}
  • dobsondev-shortcodes/tags/2.0.1/dobsondev-shortcodes.php

    r1290205 r1376499  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 2.0.0
     6 * Version: 2.0.1
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
    99 * License: GPLv2
    1010 *
    11  * Copyright 2014  Alex Dobson  (email : alex@dobsondev.com)
     11 * Copyright 2016  Alex Dobson  (email : alex@dobsondev.com)
    1212 *
    1313 * This program is free software; you can redistribute it and/or modify
     
    379379    $text = "This is an info message.";
    380380  }
    381   return '<div class="dobdev-info-msg"><i class="fa fa-info-circle"></i> ' . $text . '</div>';
     381  return '<div class="dobdev-info-msg"><i class="fa fa-info-circle dobsondev-shortcodes"></i> ' . $text . '</div>';
    382382}
    383383add_shortcode('infoMessage', 'dobsondev_shrtcode_info_message');
     
    392392    $text = "This is an success message.";
    393393  }
    394   return '<div class="dobdev-success-msg"><i class="fa fa-check"></i> ' . $text . '</div>';
     394  return '<div class="dobdev-success-msg"><i class="fa fa-check dobsondev-shortcodes"></i> ' . $text . '</div>';
    395395}
    396396add_shortcode('successMessage', 'dobsondev_shrtcode_success_message');
     
    405405    $text = "This is an warning message.";
    406406  }
    407   return '<div class="dobdev-warning-msg"><i class="fa fa-warning"></i> ' . $text . '</div>';
     407  return '<div class="dobdev-warning-msg"><i class="fa fa-warning dobsondev-shortcodes"></i> ' . $text . '</div>';
    408408}
    409409add_shortcode('warningMessage', 'dobsondev_shrtcode_warning_message');
     
    418418    $text = "This is an error message.";
    419419  }
    420   return '<div class="dobdev-error-msg"><i class="fa fa-times-circle"></i> ' . $text . '</div>';
     420  return '<div class="dobdev-error-msg"><i class="fa fa-times-circle dobsondev-shortcodes"></i> ' . $text . '</div>';
    421421}
    422422add_shortcode('errorMessage', 'dobsondev_shrtcode_error_message');
     
    473473
    474474
     475/* Adds a shortcode for displaying a simple <div> with clear both */
     476function dobsondev_shrtcode_clear_div($atts) {
     477  extract( shortcode_atts( array(), $atts ) );
     478  return '<div style="clear: both;"></div>';
     479}
     480add_shortcode('divClear', 'dobsondev_shrtcode_clear_div');
     481
     482
    475483/**
    476484 *
  • dobsondev-shortcodes/tags/2.0.1/js/tinymce-plugin.js

    r1290205 r1376499  
    1111            menu: [{
    1212                text: 'Embed PDF',
    13                 icon: 'icon fa fa-file-pdf-o',
     13                icon: 'icon fa fa-file-pdf-o dobsondev-shortcodes',
    1414                onclick: function() {
    1515                    editor.windowManager.open( {
     
    5555            {
    5656                text: 'Embed GitHub Gist',
    57                 icon: 'icon fa fa-github',
     57                icon: 'icon fa fa-github dobsondev-shortcodes',
    5858                onclick: function() {
    5959                    editor.windowManager.open( {
     
    8080            {
    8181                text: 'Embed GitHub Readme',
    82                 icon: 'icon fa fa-github',
     82                icon: 'icon fa fa-github dobsondev-shortcodes',
    8383                onclick: function() {
    8484                    editor.windowManager.open( {
     
    120120            {
    121121                text: 'Embed GitHub File',
    122                 icon: 'icon fa fa-github',
     122                icon: 'icon fa fa-github dobsondev-shortcodes',
    123123                onclick: function() {
    124124                    editor.windowManager.open( {
     
    176176            {
    177177                text: 'Twitch Stream',
    178                 icon: 'icon fa fa-twitch',
     178                icon: 'icon fa fa-twitch dobsondev-shortcodes',
    179179                onclick: function() {
    180180                    editor.windowManager.open( {
     
    220220            {
    221221                text: 'Twitch Chat',
    222                 icon: 'icon fa fa-twitch',
     222                icon: 'icon fa fa-twitch dobsondev-shortcodes',
    223223                onclick: function() {
    224224                    editor.windowManager.open( {
     
    264264            {
    265265                text: 'YouTube Video',
    266                 icon: 'icon fa fa-youtube',
     266                icon: 'icon fa fa-youtube dobsondev-shortcodes',
    267267                onclick: function() {
    268268                    editor.windowManager.open({
     
    308308            {
    309309                text: 'Inline Code',
    310                 icon: 'icon fa fa-code',
     310                icon: 'icon fa fa-code dobsondev-shortcodes',
    311311                value: '[startCode][endCode]',
    312312                onclick: function() {
     
    316316            {
    317317                text: 'Code Block',
    318                 icon: 'icon fa fa-file-code-o',
     318                icon: 'icon fa fa-file-code-o dobsondev-shortcodes',
    319319                value: '[codeBlock][endCodeBlock]',
    320320                onclick: function() {
     
    324324            {
    325325                text: 'Button',
    326                 icon: 'icon fa fa-plus-square',
     326                icon: 'icon fa fa-plus-square dobsondev-shortcodes',
    327327                onclick: function() {
    328328                    editor.windowManager.open({
     
    391391            {
    392392                text: 'User Interaction Message',
    393                 icon: 'icon fa fa-quote-left',
     393                icon: 'icon fa fa-quote-left dobsondev-shortcodes',
    394394                onclick: function() {
    395395                    editor.windowManager.open({
     
    445445            {
    446446                text: 'Related Posts',
    447                 icon: 'icon dashicons-admin-post',
     447                icon: 'icon dashicons-admin-post dobsondev-shortcodes',
    448448                value: '[relatedPosts posts=""]',
    449449                onclick: function() {
  • dobsondev-shortcodes/tags/2.0.1/js/tinymce-plugin.min.js

    r1290205 r1376499  
    1 !function(){tinymce.PluginManager.add("dobsondev_shrtcode_tinymce",function(t,e){t.addButton("dobsondev_shrtcode_tinymce_button",{title:"DobsonDev Shortcodes",type:"menubutton",icon:"icon dobsondev-icon",menu:[{text:"Embed PDF",icon:"icon fa fa-file-pdf-o",onclick:function(){t.windowManager.open({title:"Embed PDF",body:[{type:"textbox",name:"source",label:"Source *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.source?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedPDF source="'+e.data.source+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedPDF source="'+e.data.source+'" width="'+e.data.width+'"]'):t.insertContent('[embedPDF source="'+e.data.source+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedPDF source="'+e.data.source+'"]')):void alert("You must fill in the Source to embed a PDF")}})}},{text:"Embed GitHub Gist",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub Gist",body:[{type:"textbox",name:"source",label:"Source *"}],onsubmit:function(e){return e.data.source?void t.insertContent('[embedGist source="'+e.data.source+'"]'):void alert("You must fill in the Source to embed a GitHub Gist")}})}},{text:"Embed GitHub Readme",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub Readme",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(e){return e.data.owner&&e.data.repo?void(e.data.cacheid?t.insertContent('[embedGitHubReadme owner="'+e.data.owner+'" repo="'+e.data.repo+'" cache_id="'+e.data.cacheid+'"]'):t.insertContent('[embedGitHubReadme owner="'+e.data.owner+'" repo="'+e.data.repo+'"]')):void alert("You must fill in the Owner and Repository to embed a GitHub Readme")}})}},{text:"Embed GitHub File",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub File Contents",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"path",label:"Path to File *"},{type:"checkbox",name:"markdown",label:"Markdown",value:"yes",checked:!1},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(e){return e.data.owner&&e.data.repo&&e.data.path?void(e.data.markdown||e.data.cacheid?!e.data.markdown&&e.data.cacheid?t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" cache_id="'+e.data.cacheid+'"]'):e.data.markdown&&!e.data.cacheid?t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" markdown="'+e.data.markdown+'"]'):t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" markdown="'+e.data.markdown+'" cache_id="'+e.data.cacheid+'"]'):t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'"]')):void alert("You must fill in the Owner, Repository and Path to the File in order to embed a GitHub File")}})}},{text:"Twitch Stream",icon:"icon fa fa-twitch",onclick:function(){t.windowManager.open({title:"Embed Twitch Stream",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.username?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedTwitch username="'+e.data.username+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedTwitch username="'+e.data.username+'" width="'+e.data.width+'"]'):t.insertContent('[embedTwitch username="'+e.data.username+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedTwitch username="'+e.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Stream")}})}},{text:"Twitch Chat",icon:"icon fa fa-twitch",onclick:function(){t.windowManager.open({title:"Embed Twitch Chat",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.username?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedTwitchChat username="'+e.data.username+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedTwitchChat username="'+e.data.username+'" width="'+e.data.width+'"]'):t.insertContent('[embedTwitchChat username="'+e.data.username+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedTwitchChat username="'+e.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Chat")}})}},{text:"YouTube Video",icon:"icon fa fa-youtube",onclick:function(){t.windowManager.open({title:"Embed YouTube Video",body:[{type:"textbox",name:"videoid",label:"Video ID *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.videoid?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedYouTube video="'+e.data.videoid+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedYouTube video="'+e.data.videoid+'" width="'+e.data.width+'"]'):t.insertContent('[embedYouTube video="'+e.data.videoid+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedYouTube video="'+e.data.videoid+'"]')):void alert("You must fill in the Video ID in order to embed a YouTube video")}})}},{text:"Inline Code",icon:"icon fa fa-code",value:"[startCode][endCode]",onclick:function(){t.insertContent(this.value())}},{text:"Code Block",icon:"icon fa fa-file-code-o",value:"[codeBlock][endCodeBlock]",onclick:function(){t.insertContent(this.value())}},{text:"Button",icon:"icon fa fa-plus-square",onclick:function(){t.windowManager.open({title:"Embed Button",body:[{type:"textbox",name:"text",label:"Button Text *"},{type:"listbox",name:"color",label:"Color",values:[{text:"Blue",value:"blue",selected:!0},{text:"Green",value:"green"},{text:"Red",value:"red"},{text:"Orange",value:"orange"},{text:"Purple",value:"purple"},{text:"Turquoise",value:"turquoise"}]},{type:"textbox",name:"link",label:"Link"}],onsubmit:function(e){e.data.color||e.data.link?!e.data.color&&e.data.link?t.insertContent('[button text="'+e.data.text+'" link="'+e.data.color+'"]'):e.data.color&&!e.data.link?t.insertContent('[button text="'+e.data.text+'" color="'+e.data.color+'"]'):t.insertContent('[button text="'+e.data.text+'" color="'+e.data.color+'" link="'+e.data.link+'"]'):t.insertContent('[button text="'+e.data.text+'"]')}})}},{text:"User Interaction Message",icon:"icon fa fa-quote-left",onclick:function(){t.windowManager.open({title:"",body:[{type:"listbox",name:"messagetype",label:"Message Type *",values:[{text:"Info Message",value:"info",selected:!0},{text:"Success Message",value:"success"},{text:"Warning Message",value:"warning"},{text:"Error Message",value:"error"}]},{type:"textbox",name:"text",label:"Text *"}],onsubmit:function(e){"info"==e.data.messagetype?t.insertContent('[infoMessage text="'+e.data.text+'"]'):"success"==e.data.messagetype?t.insertContent('[successMessage text="'+e.data.text+'"]'):"warning"==e.data.messagetype?t.insertContent('[warningMessage text="'+e.data.text+'"]'):t.insertContent('[errorMessage text="'+e.data.text+'"]')}})}},{text:"Related Posts",icon:"icon dashicons-admin-post",value:'[relatedPosts posts=""]',onclick:function(){t.insertContent(this.value())}}]})})}();
     1!function(){tinymce.PluginManager.add("dobsondev_shrtcode_tinymce",function(e,t){e.addButton("dobsondev_shrtcode_tinymce_button",{title:"DobsonDev Shortcodes",type:"menubutton",icon:"icon dobsondev-icon",menu:[{text:"Embed PDF",icon:"icon fa fa-file-pdf-o dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed PDF",body:[{type:"textbox",name:"source",label:"Source *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.source?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedPDF source="'+t.data.source+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedPDF source="'+t.data.source+'" width="'+t.data.width+'"]'):e.insertContent('[embedPDF source="'+t.data.source+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedPDF source="'+t.data.source+'"]')):void alert("You must fill in the Source to embed a PDF")}})}},{text:"Embed GitHub Gist",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub Gist",body:[{type:"textbox",name:"source",label:"Source *"}],onsubmit:function(t){return t.data.source?void e.insertContent('[embedGist source="'+t.data.source+'"]'):void alert("You must fill in the Source to embed a GitHub Gist")}})}},{text:"Embed GitHub Readme",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub Readme",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(t){return t.data.owner&&t.data.repo?void(t.data.cacheid?e.insertContent('[embedGitHubReadme owner="'+t.data.owner+'" repo="'+t.data.repo+'" cache_id="'+t.data.cacheid+'"]'):e.insertContent('[embedGitHubReadme owner="'+t.data.owner+'" repo="'+t.data.repo+'"]')):void alert("You must fill in the Owner and Repository to embed a GitHub Readme")}})}},{text:"Embed GitHub File",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub File Contents",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"path",label:"Path to File *"},{type:"checkbox",name:"markdown",label:"Markdown",value:"yes",checked:!1},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(t){return t.data.owner&&t.data.repo&&t.data.path?void(t.data.markdown||t.data.cacheid?!t.data.markdown&&t.data.cacheid?e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" cache_id="'+t.data.cacheid+'"]'):t.data.markdown&&!t.data.cacheid?e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" markdown="'+t.data.markdown+'"]'):e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" markdown="'+t.data.markdown+'" cache_id="'+t.data.cacheid+'"]'):e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'"]')):void alert("You must fill in the Owner, Repository and Path to the File in order to embed a GitHub File")}})}},{text:"Twitch Stream",icon:"icon fa fa-twitch dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Twitch Stream",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.username?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedTwitch username="'+t.data.username+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedTwitch username="'+t.data.username+'" width="'+t.data.width+'"]'):e.insertContent('[embedTwitch username="'+t.data.username+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedTwitch username="'+t.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Stream")}})}},{text:"Twitch Chat",icon:"icon fa fa-twitch dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Twitch Chat",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.username?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedTwitchChat username="'+t.data.username+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedTwitchChat username="'+t.data.username+'" width="'+t.data.width+'"]'):e.insertContent('[embedTwitchChat username="'+t.data.username+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedTwitchChat username="'+t.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Chat")}})}},{text:"YouTube Video",icon:"icon fa fa-youtube dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed YouTube Video",body:[{type:"textbox",name:"videoid",label:"Video ID *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.videoid?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedYouTube video="'+t.data.videoid+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedYouTube video="'+t.data.videoid+'" width="'+t.data.width+'"]'):e.insertContent('[embedYouTube video="'+t.data.videoid+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedYouTube video="'+t.data.videoid+'"]')):void alert("You must fill in the Video ID in order to embed a YouTube video")}})}},{text:"Inline Code",icon:"icon fa fa-code dobsondev-shortcodes",value:"[startCode][endCode]",onclick:function(){e.insertContent(this.value())}},{text:"Code Block",icon:"icon fa fa-file-code-o dobsondev-shortcodes",value:"[codeBlock][endCodeBlock]",onclick:function(){e.insertContent(this.value())}},{text:"Button",icon:"icon fa fa-plus-square dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Button",body:[{type:"textbox",name:"text",label:"Button Text *"},{type:"listbox",name:"color",label:"Color",values:[{text:"Blue",value:"blue",selected:!0},{text:"Green",value:"green"},{text:"Red",value:"red"},{text:"Orange",value:"orange"},{text:"Purple",value:"purple"},{text:"Turquoise",value:"turquoise"}]},{type:"textbox",name:"link",label:"Link"}],onsubmit:function(t){t.data.color||t.data.link?!t.data.color&&t.data.link?e.insertContent('[button text="'+t.data.text+'" link="'+t.data.color+'"]'):t.data.color&&!t.data.link?e.insertContent('[button text="'+t.data.text+'" color="'+t.data.color+'"]'):e.insertContent('[button text="'+t.data.text+'" color="'+t.data.color+'" link="'+t.data.link+'"]'):e.insertContent('[button text="'+t.data.text+'"]')}})}},{text:"User Interaction Message",icon:"icon fa fa-quote-left dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"",body:[{type:"listbox",name:"messagetype",label:"Message Type *",values:[{text:"Info Message",value:"info",selected:!0},{text:"Success Message",value:"success"},{text:"Warning Message",value:"warning"},{text:"Error Message",value:"error"}]},{type:"textbox",name:"text",label:"Text *"}],onsubmit:function(t){"info"==t.data.messagetype?e.insertContent('[infoMessage text="'+t.data.text+'"]'):"success"==t.data.messagetype?e.insertContent('[successMessage text="'+t.data.text+'"]'):"warning"==t.data.messagetype?e.insertContent('[warningMessage text="'+t.data.text+'"]'):e.insertContent('[errorMessage text="'+t.data.text+'"]')}})}},{text:"Related Posts",icon:"icon dashicons-admin-post dobsondev-shortcodes",value:'[relatedPosts posts=""]',onclick:function(){e.insertContent(this.value())}}]})})}();
  • dobsondev-shortcodes/tags/2.0.1/readme.txt

    r1290205 r1376499  
    66Tags: dobsondev, shortcodes, pdf, portable document format, github gists, github, gists, github readme, github project readme, github repo readme, github file contents, twitch streams, twitch, twitch tv, twitch chat, YouTube video, YouTube, inline code, code snippets, code block, programming, code examples, button, buttons, css button, css buttons, button shortcode, buttons shortcodes, user interaction, user interaction messages, info message, information message, success message, warning message, error message, related posts, related posts shortcode, jquery, jquery related posts, related posts slideshow, tinymce, tinymce plugin, user interface
    77Requires at least: 2.5
    8 Tested up to: 4.4
    9 Stable tag: 2.0.0
     8Tested up to: 4.4.2
     9Stable tag: 2.0.1
    1010
    1111Add a collection of helpful shortcodes to your site.
  • dobsondev-shortcodes/trunk/changelog.txt

    r1290205 r1376499  
    33New Features
    44
     5* Added a shortcode (divClear) that provides a <div> with clear: both; (2.0.1)
    56* Added a TinyMCE Plugin that provides a user interface for the shortcodes. Click on the DobsonDev Shortcodes button in the TinyMCE editor will produce a dropdown with all of the available shortcodes you can use, simply click on the shortcode you want and a popup with the available attributes will appear. Fill them out and the shortcode will appear in the editor completed. (2.0.0)
    67* Updated Font Awesome to 4.4.0 (2.0.0)
     
    89Bug Fixes
    910
     11* Fixed a bug where other Font Awesome usages could be affected by this plugin's CSS (2.0.1)
    1012* Tested up to WordPress 4.4 (2.0.0)
    1113* Fixed a bug where not all of the CSS and JavaScript files were minified (2.0.0)
  • dobsondev-shortcodes/trunk/css/dobsondev-shortcodes.css

    r1290205 r1376499  
    142142}
    143143/* Required for FontAwesome icons to work properly in TinyMCE */
    144 i.fa {
     144i.fa.dobsondev-shortcodes {
    145145  font: 400 20px/1 FontAwesome !important;
    146146  padding: 0;
     
    153153}
    154154/* Required for Dashicons to work properly in TinyMCE */
    155 i.mce-i-icon {
     155i.mce-i-icon.dobsondev-shortcodes {
    156156  font: 400 20px/1 dashicons;
    157157  padding: 0;
  • dobsondev-shortcodes/trunk/css/dobsondev-shortcodes.min.css

    r1290205 r1376499  
    1 div.dobdev-youtube-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}div.dobdev-youtube-container iframe,div.dobdev-youtube-container object,div.dobdev-youtube-container embed{position:absolute;top:0;left:0;width:100%;height:100%}code.dobdev-code-inline{font-family:monospace,monospace;font-size:1em}pre.dobdev-code-block{background:none repeat scroll 0 0 #111;color:#EEE;border-radius:3px 3px 3px 3px;padding:8px 8px 8px 5px}a.dobdev-red-button{display:inline-block;background:#D11 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #D11;color:#FFF;text-decoration:none}a.dobdev-red-button:hover{background:#FFF none no-repeat right top;color:#D11}a.dobdev-blue-button{display:inline-block;width:auto;background:#09F none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #09F;color:#FFF;text-decoration:none}a.dobdev-blue-button:hover{background:#FFF none no-repeat right top;color:#09F}a.dobdev-green-button{display:inline-block;background:#090 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #090;color:#FFF;text-decoration:none}a.dobdev-green-button:hover{background:#FFF none no-repeat right top;color:#090}a.dobdev-orange-button{display:inline-block;background:#F70 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #F70;color:#FFF;text-decoration:none}a.dobdev-orange-button:hover{background:#FFF none no-repeat right top;color:#F70}a.dobdev-purple-button{display:inline-block;background:#909 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #909;color:#FFF;text-decoration:none}a.dobdev-purple-button:hover{background:#FFF none no-repeat right top;color:#909}a.dobdev-turquoise-button{display:inline-block;background:#099 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #099;color:#FFF;text-decoration:none}a.dobdev-turquoise-button:hover{background:#FFF none no-repeat right top;color:#099}div.dobdev-info-msg,div.dobdev-success-msg,div.dobdev-warning-msg,div.dobdev-error-msg{margin:10px 0;padding:10px;border-radius:3px 3px 3px 3px}div.dobdev-info-msg{color:#059;background-color:#BEF}div.dobdev-success-msg{color:#270;background-color:#DFF2BF}div.dobdev-warning-msg{color:#9F6000;background-color:#FEEFB3}div.dobdev-error-msg{color:#D8000C;background-color:#FFBABA}div.dobdev-related-posts-post{display:none}div.dobdev-related-posts-post a{text-decoration:none}i.dobsondev-icon{background-image:url(../res/imgs/dd-shortcodes.png)}i.fa{font:400 20px/1 FontAwesome!important;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}i.mce-i-icon{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}
     1div.dobdev-youtube-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}div.dobdev-youtube-container iframe,div.dobdev-youtube-container object,div.dobdev-youtube-container embed{position:absolute;top:0;left:0;width:100%;height:100%}code.dobdev-code-inline{font-family:monospace,monospace;font-size:1em}pre.dobdev-code-block{background:none repeat scroll 0 0 #111;color:#EEE;border-radius:3px 3px 3px 3px;padding:8px 8px 8px 5px}a.dobdev-red-button{display:inline-block;background:#D11 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #D11;color:#FFF;text-decoration:none}a.dobdev-red-button:hover{background:#FFF none no-repeat right top;color:#D11}a.dobdev-blue-button{display:inline-block;width:auto;background:#09F none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #09F;color:#FFF;text-decoration:none}a.dobdev-blue-button:hover{background:#FFF none no-repeat right top;color:#09F}a.dobdev-green-button{display:inline-block;background:#090 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #090;color:#FFF;text-decoration:none}a.dobdev-green-button:hover{background:#FFF none no-repeat right top;color:#090}a.dobdev-orange-button{display:inline-block;background:#F70 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #F70;color:#FFF;text-decoration:none}a.dobdev-orange-button:hover{background:#FFF none no-repeat right top;color:#F70}a.dobdev-purple-button{display:inline-block;background:#909 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #909;color:#FFF;text-decoration:none}a.dobdev-purple-button:hover{background:#FFF none no-repeat right top;color:#909}a.dobdev-turquoise-button{display:inline-block;background:#099 none no-repeat right top;padding:15px;border-radius:5px;border:5px solid #099;color:#FFF;text-decoration:none}a.dobdev-turquoise-button:hover{background:#FFF none no-repeat right top;color:#099}div.dobdev-info-msg,div.dobdev-success-msg,div.dobdev-warning-msg,div.dobdev-error-msg{margin:10px 0;padding:10px;border-radius:3px 3px 3px 3px}div.dobdev-info-msg{color:#059;background-color:#BEF}div.dobdev-success-msg{color:#270;background-color:#DFF2BF}div.dobdev-warning-msg{color:#9F6000;background-color:#FEEFB3}div.dobdev-error-msg{color:#D8000C;background-color:#FFBABA}div.dobdev-related-posts-post{display:none}div.dobdev-related-posts-post a{text-decoration:none}i.dobsondev-icon{background-image:url(../res/imgs/dd-shortcodes.png)}i.fa.dobsondev-shortcodes{font:400 20px/1 FontAwesome!important;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}i.mce-i-icon.dobsondev-shortcodes{font:400 20px/1 dashicons;padding:0;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:-2px;padding-right:2px}
  • dobsondev-shortcodes/trunk/dobsondev-shortcodes.php

    r1290205 r1376499  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 2.0.0
     6 * Version: 2.0.1
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
    99 * License: GPLv2
    1010 *
    11  * Copyright 2014  Alex Dobson  (email : alex@dobsondev.com)
     11 * Copyright 2016  Alex Dobson  (email : alex@dobsondev.com)
    1212 *
    1313 * This program is free software; you can redistribute it and/or modify
     
    379379    $text = "This is an info message.";
    380380  }
    381   return '<div class="dobdev-info-msg"><i class="fa fa-info-circle"></i> ' . $text . '</div>';
     381  return '<div class="dobdev-info-msg"><i class="fa fa-info-circle dobsondev-shortcodes"></i> ' . $text . '</div>';
    382382}
    383383add_shortcode('infoMessage', 'dobsondev_shrtcode_info_message');
     
    392392    $text = "This is an success message.";
    393393  }
    394   return '<div class="dobdev-success-msg"><i class="fa fa-check"></i> ' . $text . '</div>';
     394  return '<div class="dobdev-success-msg"><i class="fa fa-check dobsondev-shortcodes"></i> ' . $text . '</div>';
    395395}
    396396add_shortcode('successMessage', 'dobsondev_shrtcode_success_message');
     
    405405    $text = "This is an warning message.";
    406406  }
    407   return '<div class="dobdev-warning-msg"><i class="fa fa-warning"></i> ' . $text . '</div>';
     407  return '<div class="dobdev-warning-msg"><i class="fa fa-warning dobsondev-shortcodes"></i> ' . $text . '</div>';
    408408}
    409409add_shortcode('warningMessage', 'dobsondev_shrtcode_warning_message');
     
    418418    $text = "This is an error message.";
    419419  }
    420   return '<div class="dobdev-error-msg"><i class="fa fa-times-circle"></i> ' . $text . '</div>';
     420  return '<div class="dobdev-error-msg"><i class="fa fa-times-circle dobsondev-shortcodes"></i> ' . $text . '</div>';
    421421}
    422422add_shortcode('errorMessage', 'dobsondev_shrtcode_error_message');
     
    473473
    474474
     475/* Adds a shortcode for displaying a simple <div> with clear both */
     476function dobsondev_shrtcode_clear_div($atts) {
     477  extract( shortcode_atts( array(), $atts ) );
     478  return '<div style="clear: both;"></div>';
     479}
     480add_shortcode('divClear', 'dobsondev_shrtcode_clear_div');
     481
     482
    475483/**
    476484 *
  • dobsondev-shortcodes/trunk/js/tinymce-plugin.js

    r1290205 r1376499  
    1111            menu: [{
    1212                text: 'Embed PDF',
    13                 icon: 'icon fa fa-file-pdf-o',
     13                icon: 'icon fa fa-file-pdf-o dobsondev-shortcodes',
    1414                onclick: function() {
    1515                    editor.windowManager.open( {
     
    5555            {
    5656                text: 'Embed GitHub Gist',
    57                 icon: 'icon fa fa-github',
     57                icon: 'icon fa fa-github dobsondev-shortcodes',
    5858                onclick: function() {
    5959                    editor.windowManager.open( {
     
    8080            {
    8181                text: 'Embed GitHub Readme',
    82                 icon: 'icon fa fa-github',
     82                icon: 'icon fa fa-github dobsondev-shortcodes',
    8383                onclick: function() {
    8484                    editor.windowManager.open( {
     
    120120            {
    121121                text: 'Embed GitHub File',
    122                 icon: 'icon fa fa-github',
     122                icon: 'icon fa fa-github dobsondev-shortcodes',
    123123                onclick: function() {
    124124                    editor.windowManager.open( {
     
    176176            {
    177177                text: 'Twitch Stream',
    178                 icon: 'icon fa fa-twitch',
     178                icon: 'icon fa fa-twitch dobsondev-shortcodes',
    179179                onclick: function() {
    180180                    editor.windowManager.open( {
     
    220220            {
    221221                text: 'Twitch Chat',
    222                 icon: 'icon fa fa-twitch',
     222                icon: 'icon fa fa-twitch dobsondev-shortcodes',
    223223                onclick: function() {
    224224                    editor.windowManager.open( {
     
    264264            {
    265265                text: 'YouTube Video',
    266                 icon: 'icon fa fa-youtube',
     266                icon: 'icon fa fa-youtube dobsondev-shortcodes',
    267267                onclick: function() {
    268268                    editor.windowManager.open({
     
    308308            {
    309309                text: 'Inline Code',
    310                 icon: 'icon fa fa-code',
     310                icon: 'icon fa fa-code dobsondev-shortcodes',
    311311                value: '[startCode][endCode]',
    312312                onclick: function() {
     
    316316            {
    317317                text: 'Code Block',
    318                 icon: 'icon fa fa-file-code-o',
     318                icon: 'icon fa fa-file-code-o dobsondev-shortcodes',
    319319                value: '[codeBlock][endCodeBlock]',
    320320                onclick: function() {
     
    324324            {
    325325                text: 'Button',
    326                 icon: 'icon fa fa-plus-square',
     326                icon: 'icon fa fa-plus-square dobsondev-shortcodes',
    327327                onclick: function() {
    328328                    editor.windowManager.open({
     
    391391            {
    392392                text: 'User Interaction Message',
    393                 icon: 'icon fa fa-quote-left',
     393                icon: 'icon fa fa-quote-left dobsondev-shortcodes',
    394394                onclick: function() {
    395395                    editor.windowManager.open({
     
    445445            {
    446446                text: 'Related Posts',
    447                 icon: 'icon dashicons-admin-post',
     447                icon: 'icon dashicons-admin-post dobsondev-shortcodes',
    448448                value: '[relatedPosts posts=""]',
    449449                onclick: function() {
  • dobsondev-shortcodes/trunk/js/tinymce-plugin.min.js

    r1290205 r1376499  
    1 !function(){tinymce.PluginManager.add("dobsondev_shrtcode_tinymce",function(t,e){t.addButton("dobsondev_shrtcode_tinymce_button",{title:"DobsonDev Shortcodes",type:"menubutton",icon:"icon dobsondev-icon",menu:[{text:"Embed PDF",icon:"icon fa fa-file-pdf-o",onclick:function(){t.windowManager.open({title:"Embed PDF",body:[{type:"textbox",name:"source",label:"Source *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.source?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedPDF source="'+e.data.source+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedPDF source="'+e.data.source+'" width="'+e.data.width+'"]'):t.insertContent('[embedPDF source="'+e.data.source+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedPDF source="'+e.data.source+'"]')):void alert("You must fill in the Source to embed a PDF")}})}},{text:"Embed GitHub Gist",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub Gist",body:[{type:"textbox",name:"source",label:"Source *"}],onsubmit:function(e){return e.data.source?void t.insertContent('[embedGist source="'+e.data.source+'"]'):void alert("You must fill in the Source to embed a GitHub Gist")}})}},{text:"Embed GitHub Readme",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub Readme",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(e){return e.data.owner&&e.data.repo?void(e.data.cacheid?t.insertContent('[embedGitHubReadme owner="'+e.data.owner+'" repo="'+e.data.repo+'" cache_id="'+e.data.cacheid+'"]'):t.insertContent('[embedGitHubReadme owner="'+e.data.owner+'" repo="'+e.data.repo+'"]')):void alert("You must fill in the Owner and Repository to embed a GitHub Readme")}})}},{text:"Embed GitHub File",icon:"icon fa fa-github",onclick:function(){t.windowManager.open({title:"Embed GitHub File Contents",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"path",label:"Path to File *"},{type:"checkbox",name:"markdown",label:"Markdown",value:"yes",checked:!1},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(e){return e.data.owner&&e.data.repo&&e.data.path?void(e.data.markdown||e.data.cacheid?!e.data.markdown&&e.data.cacheid?t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" cache_id="'+e.data.cacheid+'"]'):e.data.markdown&&!e.data.cacheid?t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" markdown="'+e.data.markdown+'"]'):t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'" markdown="'+e.data.markdown+'" cache_id="'+e.data.cacheid+'"]'):t.insertContent('[embedGitHubContent owner="'+e.data.owner+'" repo="'+e.data.repo+'" path="'+e.data.path+'"]')):void alert("You must fill in the Owner, Repository and Path to the File in order to embed a GitHub File")}})}},{text:"Twitch Stream",icon:"icon fa fa-twitch",onclick:function(){t.windowManager.open({title:"Embed Twitch Stream",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.username?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedTwitch username="'+e.data.username+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedTwitch username="'+e.data.username+'" width="'+e.data.width+'"]'):t.insertContent('[embedTwitch username="'+e.data.username+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedTwitch username="'+e.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Stream")}})}},{text:"Twitch Chat",icon:"icon fa fa-twitch",onclick:function(){t.windowManager.open({title:"Embed Twitch Chat",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.username?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedTwitchChat username="'+e.data.username+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedTwitchChat username="'+e.data.username+'" width="'+e.data.width+'"]'):t.insertContent('[embedTwitchChat username="'+e.data.username+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedTwitchChat username="'+e.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Chat")}})}},{text:"YouTube Video",icon:"icon fa fa-youtube",onclick:function(){t.windowManager.open({title:"Embed YouTube Video",body:[{type:"textbox",name:"videoid",label:"Video ID *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(e){return e.data.videoid?void(e.data.width||e.data.height?!e.data.width&&e.data.height?t.insertContent('[embedYouTube video="'+e.data.videoid+'" height="'+e.data.height+'"]'):e.data.width&&!e.data.height?t.insertContent('[embedYouTube video="'+e.data.videoid+'" width="'+e.data.width+'"]'):t.insertContent('[embedYouTube video="'+e.data.videoid+'" width="'+e.data.width+'" height="'+e.data.height+'"]'):t.insertContent('[embedYouTube video="'+e.data.videoid+'"]')):void alert("You must fill in the Video ID in order to embed a YouTube video")}})}},{text:"Inline Code",icon:"icon fa fa-code",value:"[startCode][endCode]",onclick:function(){t.insertContent(this.value())}},{text:"Code Block",icon:"icon fa fa-file-code-o",value:"[codeBlock][endCodeBlock]",onclick:function(){t.insertContent(this.value())}},{text:"Button",icon:"icon fa fa-plus-square",onclick:function(){t.windowManager.open({title:"Embed Button",body:[{type:"textbox",name:"text",label:"Button Text *"},{type:"listbox",name:"color",label:"Color",values:[{text:"Blue",value:"blue",selected:!0},{text:"Green",value:"green"},{text:"Red",value:"red"},{text:"Orange",value:"orange"},{text:"Purple",value:"purple"},{text:"Turquoise",value:"turquoise"}]},{type:"textbox",name:"link",label:"Link"}],onsubmit:function(e){e.data.color||e.data.link?!e.data.color&&e.data.link?t.insertContent('[button text="'+e.data.text+'" link="'+e.data.color+'"]'):e.data.color&&!e.data.link?t.insertContent('[button text="'+e.data.text+'" color="'+e.data.color+'"]'):t.insertContent('[button text="'+e.data.text+'" color="'+e.data.color+'" link="'+e.data.link+'"]'):t.insertContent('[button text="'+e.data.text+'"]')}})}},{text:"User Interaction Message",icon:"icon fa fa-quote-left",onclick:function(){t.windowManager.open({title:"",body:[{type:"listbox",name:"messagetype",label:"Message Type *",values:[{text:"Info Message",value:"info",selected:!0},{text:"Success Message",value:"success"},{text:"Warning Message",value:"warning"},{text:"Error Message",value:"error"}]},{type:"textbox",name:"text",label:"Text *"}],onsubmit:function(e){"info"==e.data.messagetype?t.insertContent('[infoMessage text="'+e.data.text+'"]'):"success"==e.data.messagetype?t.insertContent('[successMessage text="'+e.data.text+'"]'):"warning"==e.data.messagetype?t.insertContent('[warningMessage text="'+e.data.text+'"]'):t.insertContent('[errorMessage text="'+e.data.text+'"]')}})}},{text:"Related Posts",icon:"icon dashicons-admin-post",value:'[relatedPosts posts=""]',onclick:function(){t.insertContent(this.value())}}]})})}();
     1!function(){tinymce.PluginManager.add("dobsondev_shrtcode_tinymce",function(e,t){e.addButton("dobsondev_shrtcode_tinymce_button",{title:"DobsonDev Shortcodes",type:"menubutton",icon:"icon dobsondev-icon",menu:[{text:"Embed PDF",icon:"icon fa fa-file-pdf-o dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed PDF",body:[{type:"textbox",name:"source",label:"Source *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.source?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedPDF source="'+t.data.source+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedPDF source="'+t.data.source+'" width="'+t.data.width+'"]'):e.insertContent('[embedPDF source="'+t.data.source+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedPDF source="'+t.data.source+'"]')):void alert("You must fill in the Source to embed a PDF")}})}},{text:"Embed GitHub Gist",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub Gist",body:[{type:"textbox",name:"source",label:"Source *"}],onsubmit:function(t){return t.data.source?void e.insertContent('[embedGist source="'+t.data.source+'"]'):void alert("You must fill in the Source to embed a GitHub Gist")}})}},{text:"Embed GitHub Readme",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub Readme",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(t){return t.data.owner&&t.data.repo?void(t.data.cacheid?e.insertContent('[embedGitHubReadme owner="'+t.data.owner+'" repo="'+t.data.repo+'" cache_id="'+t.data.cacheid+'"]'):e.insertContent('[embedGitHubReadme owner="'+t.data.owner+'" repo="'+t.data.repo+'"]')):void alert("You must fill in the Owner and Repository to embed a GitHub Readme")}})}},{text:"Embed GitHub File",icon:"icon fa fa-github dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed GitHub File Contents",body:[{type:"textbox",name:"owner",label:"Owner *"},{type:"textbox",name:"repo",label:"Repository *"},{type:"textbox",name:"path",label:"Path to File *"},{type:"checkbox",name:"markdown",label:"Markdown",value:"yes",checked:!1},{type:"textbox",name:"cacheid",label:"Cache ID"}],onsubmit:function(t){return t.data.owner&&t.data.repo&&t.data.path?void(t.data.markdown||t.data.cacheid?!t.data.markdown&&t.data.cacheid?e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" cache_id="'+t.data.cacheid+'"]'):t.data.markdown&&!t.data.cacheid?e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" markdown="'+t.data.markdown+'"]'):e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'" markdown="'+t.data.markdown+'" cache_id="'+t.data.cacheid+'"]'):e.insertContent('[embedGitHubContent owner="'+t.data.owner+'" repo="'+t.data.repo+'" path="'+t.data.path+'"]')):void alert("You must fill in the Owner, Repository and Path to the File in order to embed a GitHub File")}})}},{text:"Twitch Stream",icon:"icon fa fa-twitch dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Twitch Stream",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.username?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedTwitch username="'+t.data.username+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedTwitch username="'+t.data.username+'" width="'+t.data.width+'"]'):e.insertContent('[embedTwitch username="'+t.data.username+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedTwitch username="'+t.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Stream")}})}},{text:"Twitch Chat",icon:"icon fa fa-twitch dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Twitch Chat",body:[{type:"textbox",name:"username",label:"Username *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.username?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedTwitchChat username="'+t.data.username+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedTwitchChat username="'+t.data.username+'" width="'+t.data.width+'"]'):e.insertContent('[embedTwitchChat username="'+t.data.username+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedTwitchChat username="'+t.data.username+'"]')):void alert("You must fill in the Username in order to embed a Twitch Chat")}})}},{text:"YouTube Video",icon:"icon fa fa-youtube dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed YouTube Video",body:[{type:"textbox",name:"videoid",label:"Video ID *"},{type:"textbox",name:"width",label:"Width"},{type:"textbox",name:"height",label:"Height"}],onsubmit:function(t){return t.data.videoid?void(t.data.width||t.data.height?!t.data.width&&t.data.height?e.insertContent('[embedYouTube video="'+t.data.videoid+'" height="'+t.data.height+'"]'):t.data.width&&!t.data.height?e.insertContent('[embedYouTube video="'+t.data.videoid+'" width="'+t.data.width+'"]'):e.insertContent('[embedYouTube video="'+t.data.videoid+'" width="'+t.data.width+'" height="'+t.data.height+'"]'):e.insertContent('[embedYouTube video="'+t.data.videoid+'"]')):void alert("You must fill in the Video ID in order to embed a YouTube video")}})}},{text:"Inline Code",icon:"icon fa fa-code dobsondev-shortcodes",value:"[startCode][endCode]",onclick:function(){e.insertContent(this.value())}},{text:"Code Block",icon:"icon fa fa-file-code-o dobsondev-shortcodes",value:"[codeBlock][endCodeBlock]",onclick:function(){e.insertContent(this.value())}},{text:"Button",icon:"icon fa fa-plus-square dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"Embed Button",body:[{type:"textbox",name:"text",label:"Button Text *"},{type:"listbox",name:"color",label:"Color",values:[{text:"Blue",value:"blue",selected:!0},{text:"Green",value:"green"},{text:"Red",value:"red"},{text:"Orange",value:"orange"},{text:"Purple",value:"purple"},{text:"Turquoise",value:"turquoise"}]},{type:"textbox",name:"link",label:"Link"}],onsubmit:function(t){t.data.color||t.data.link?!t.data.color&&t.data.link?e.insertContent('[button text="'+t.data.text+'" link="'+t.data.color+'"]'):t.data.color&&!t.data.link?e.insertContent('[button text="'+t.data.text+'" color="'+t.data.color+'"]'):e.insertContent('[button text="'+t.data.text+'" color="'+t.data.color+'" link="'+t.data.link+'"]'):e.insertContent('[button text="'+t.data.text+'"]')}})}},{text:"User Interaction Message",icon:"icon fa fa-quote-left dobsondev-shortcodes",onclick:function(){e.windowManager.open({title:"",body:[{type:"listbox",name:"messagetype",label:"Message Type *",values:[{text:"Info Message",value:"info",selected:!0},{text:"Success Message",value:"success"},{text:"Warning Message",value:"warning"},{text:"Error Message",value:"error"}]},{type:"textbox",name:"text",label:"Text *"}],onsubmit:function(t){"info"==t.data.messagetype?e.insertContent('[infoMessage text="'+t.data.text+'"]'):"success"==t.data.messagetype?e.insertContent('[successMessage text="'+t.data.text+'"]'):"warning"==t.data.messagetype?e.insertContent('[warningMessage text="'+t.data.text+'"]'):e.insertContent('[errorMessage text="'+t.data.text+'"]')}})}},{text:"Related Posts",icon:"icon dashicons-admin-post dobsondev-shortcodes",value:'[relatedPosts posts=""]',onclick:function(){e.insertContent(this.value())}}]})})}();
  • dobsondev-shortcodes/trunk/readme.txt

    r1290205 r1376499  
    66Tags: dobsondev, shortcodes, pdf, portable document format, github gists, github, gists, github readme, github project readme, github repo readme, github file contents, twitch streams, twitch, twitch tv, twitch chat, YouTube video, YouTube, inline code, code snippets, code block, programming, code examples, button, buttons, css button, css buttons, button shortcode, buttons shortcodes, user interaction, user interaction messages, info message, information message, success message, warning message, error message, related posts, related posts shortcode, jquery, jquery related posts, related posts slideshow, tinymce, tinymce plugin, user interface
    77Requires at least: 2.5
    8 Tested up to: 4.4
    9 Stable tag: 2.0.0
     8Tested up to: 4.4.2
     9Stable tag: 2.0.1
    1010
    1111Add a collection of helpful shortcodes to your site.
Note: See TracChangeset for help on using the changeset viewer.