Changeset 1376499
- Timestamp:
- 03/22/2016 05:48:24 PM (10 years ago)
- Location:
- dobsondev-shortcodes
- Files:
-
- 7 edited
- 12 copied
-
tags/2.0.1 (copied) (copied from dobsondev-shortcodes/trunk)
-
tags/2.0.1/changelog.txt (copied) (copied from dobsondev-shortcodes/trunk/changelog.txt) (2 diffs)
-
tags/2.0.1/css (copied) (copied from dobsondev-shortcodes/trunk/css)
-
tags/2.0.1/css/dobsondev-shortcodes.css (copied) (copied from dobsondev-shortcodes/trunk/css/dobsondev-shortcodes.css) (2 diffs)
-
tags/2.0.1/css/dobsondev-shortcodes.min.css (copied) (copied from dobsondev-shortcodes/trunk/css/dobsondev-shortcodes.min.css) (1 diff)
-
tags/2.0.1/dobsondev-shortcodes.php (copied) (copied from dobsondev-shortcodes/trunk/dobsondev-shortcodes.php) (6 diffs)
-
tags/2.0.1/js (copied) (copied from dobsondev-shortcodes/trunk/js)
-
tags/2.0.1/js/tinymce-plugin.js (copied) (copied from dobsondev-shortcodes/trunk/js/tinymce-plugin.js) (12 diffs)
-
tags/2.0.1/js/tinymce-plugin.min.js (copied) (copied from dobsondev-shortcodes/trunk/js/tinymce-plugin.min.js) (1 diff)
-
tags/2.0.1/libs (copied) (copied from dobsondev-shortcodes/trunk/libs)
-
tags/2.0.1/readme.txt (copied) (copied from dobsondev-shortcodes/trunk/readme.txt) (1 diff)
-
tags/2.0.1/res (copied) (copied from dobsondev-shortcodes/trunk/res)
-
trunk/changelog.txt (modified) (2 diffs)
-
trunk/css/dobsondev-shortcodes.css (modified) (2 diffs)
-
trunk/css/dobsondev-shortcodes.min.css (modified) (1 diff)
-
trunk/dobsondev-shortcodes.php (modified) (6 diffs)
-
trunk/js/tinymce-plugin.js (modified) (12 diffs)
-
trunk/js/tinymce-plugin.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dobsondev-shortcodes/tags/2.0.1/changelog.txt
r1290205 r1376499 3 3 New Features 4 4 5 * Added a shortcode (divClear) that provides a <div> with clear: both; (2.0.1) 5 6 * 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) 6 7 * Updated Font Awesome to 4.4.0 (2.0.0) … … 8 9 Bug Fixes 9 10 11 * Fixed a bug where other Font Awesome usages could be affected by this plugin's CSS (2.0.1) 10 12 * Tested up to WordPress 4.4 (2.0.0) 11 13 * 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 142 142 } 143 143 /* Required for FontAwesome icons to work properly in TinyMCE */ 144 i.fa {144 i.fa.dobsondev-shortcodes { 145 145 font: 400 20px/1 FontAwesome !important; 146 146 padding: 0; … … 153 153 } 154 154 /* Required for Dashicons to work properly in TinyMCE */ 155 i.mce-i-icon {155 i.mce-i-icon.dobsondev-shortcodes { 156 156 font: 400 20px/1 dashicons; 157 157 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}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.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 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 2.0. 06 * Version: 2.0.1 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ 9 9 * License: GPLv2 10 10 * 11 * Copyright 201 4Alex Dobson (email : alex@dobsondev.com)11 * Copyright 2016 Alex Dobson (email : alex@dobsondev.com) 12 12 * 13 13 * This program is free software; you can redistribute it and/or modify … … 379 379 $text = "This is an info message."; 380 380 } 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>'; 382 382 } 383 383 add_shortcode('infoMessage', 'dobsondev_shrtcode_info_message'); … … 392 392 $text = "This is an success message."; 393 393 } 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>'; 395 395 } 396 396 add_shortcode('successMessage', 'dobsondev_shrtcode_success_message'); … … 405 405 $text = "This is an warning message."; 406 406 } 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>'; 408 408 } 409 409 add_shortcode('warningMessage', 'dobsondev_shrtcode_warning_message'); … … 418 418 $text = "This is an error message."; 419 419 } 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>'; 421 421 } 422 422 add_shortcode('errorMessage', 'dobsondev_shrtcode_error_message'); … … 473 473 474 474 475 /* Adds a shortcode for displaying a simple <div> with clear both */ 476 function dobsondev_shrtcode_clear_div($atts) { 477 extract( shortcode_atts( array(), $atts ) ); 478 return '<div style="clear: both;"></div>'; 479 } 480 add_shortcode('divClear', 'dobsondev_shrtcode_clear_div'); 481 482 475 483 /** 476 484 * -
dobsondev-shortcodes/tags/2.0.1/js/tinymce-plugin.js
r1290205 r1376499 11 11 menu: [{ 12 12 text: 'Embed PDF', 13 icon: 'icon fa fa-file-pdf-o ',13 icon: 'icon fa fa-file-pdf-o dobsondev-shortcodes', 14 14 onclick: function() { 15 15 editor.windowManager.open( { … … 55 55 { 56 56 text: 'Embed GitHub Gist', 57 icon: 'icon fa fa-github ',57 icon: 'icon fa fa-github dobsondev-shortcodes', 58 58 onclick: function() { 59 59 editor.windowManager.open( { … … 80 80 { 81 81 text: 'Embed GitHub Readme', 82 icon: 'icon fa fa-github ',82 icon: 'icon fa fa-github dobsondev-shortcodes', 83 83 onclick: function() { 84 84 editor.windowManager.open( { … … 120 120 { 121 121 text: 'Embed GitHub File', 122 icon: 'icon fa fa-github ',122 icon: 'icon fa fa-github dobsondev-shortcodes', 123 123 onclick: function() { 124 124 editor.windowManager.open( { … … 176 176 { 177 177 text: 'Twitch Stream', 178 icon: 'icon fa fa-twitch ',178 icon: 'icon fa fa-twitch dobsondev-shortcodes', 179 179 onclick: function() { 180 180 editor.windowManager.open( { … … 220 220 { 221 221 text: 'Twitch Chat', 222 icon: 'icon fa fa-twitch ',222 icon: 'icon fa fa-twitch dobsondev-shortcodes', 223 223 onclick: function() { 224 224 editor.windowManager.open( { … … 264 264 { 265 265 text: 'YouTube Video', 266 icon: 'icon fa fa-youtube ',266 icon: 'icon fa fa-youtube dobsondev-shortcodes', 267 267 onclick: function() { 268 268 editor.windowManager.open({ … … 308 308 { 309 309 text: 'Inline Code', 310 icon: 'icon fa fa-code ',310 icon: 'icon fa fa-code dobsondev-shortcodes', 311 311 value: '[startCode][endCode]', 312 312 onclick: function() { … … 316 316 { 317 317 text: 'Code Block', 318 icon: 'icon fa fa-file-code-o ',318 icon: 'icon fa fa-file-code-o dobsondev-shortcodes', 319 319 value: '[codeBlock][endCodeBlock]', 320 320 onclick: function() { … … 324 324 { 325 325 text: 'Button', 326 icon: 'icon fa fa-plus-square ',326 icon: 'icon fa fa-plus-square dobsondev-shortcodes', 327 327 onclick: function() { 328 328 editor.windowManager.open({ … … 391 391 { 392 392 text: 'User Interaction Message', 393 icon: 'icon fa fa-quote-left ',393 icon: 'icon fa fa-quote-left dobsondev-shortcodes', 394 394 onclick: function() { 395 395 editor.windowManager.open({ … … 445 445 { 446 446 text: 'Related Posts', 447 icon: 'icon dashicons-admin-post ',447 icon: 'icon dashicons-admin-post dobsondev-shortcodes', 448 448 value: '[relatedPosts posts=""]', 449 449 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 6 6 Tags: 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 7 7 Requires at least: 2.5 8 Tested up to: 4.4 9 Stable tag: 2.0. 08 Tested up to: 4.4.2 9 Stable tag: 2.0.1 10 10 11 11 Add a collection of helpful shortcodes to your site. -
dobsondev-shortcodes/trunk/changelog.txt
r1290205 r1376499 3 3 New Features 4 4 5 * Added a shortcode (divClear) that provides a <div> with clear: both; (2.0.1) 5 6 * 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) 6 7 * Updated Font Awesome to 4.4.0 (2.0.0) … … 8 9 Bug Fixes 9 10 11 * Fixed a bug where other Font Awesome usages could be affected by this plugin's CSS (2.0.1) 10 12 * Tested up to WordPress 4.4 (2.0.0) 11 13 * 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 142 142 } 143 143 /* Required for FontAwesome icons to work properly in TinyMCE */ 144 i.fa {144 i.fa.dobsondev-shortcodes { 145 145 font: 400 20px/1 FontAwesome !important; 146 146 padding: 0; … … 153 153 } 154 154 /* Required for Dashicons to work properly in TinyMCE */ 155 i.mce-i-icon {155 i.mce-i-icon.dobsondev-shortcodes { 156 156 font: 400 20px/1 dashicons; 157 157 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}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.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 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 2.0. 06 * Version: 2.0.1 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ 9 9 * License: GPLv2 10 10 * 11 * Copyright 201 4Alex Dobson (email : alex@dobsondev.com)11 * Copyright 2016 Alex Dobson (email : alex@dobsondev.com) 12 12 * 13 13 * This program is free software; you can redistribute it and/or modify … … 379 379 $text = "This is an info message."; 380 380 } 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>'; 382 382 } 383 383 add_shortcode('infoMessage', 'dobsondev_shrtcode_info_message'); … … 392 392 $text = "This is an success message."; 393 393 } 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>'; 395 395 } 396 396 add_shortcode('successMessage', 'dobsondev_shrtcode_success_message'); … … 405 405 $text = "This is an warning message."; 406 406 } 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>'; 408 408 } 409 409 add_shortcode('warningMessage', 'dobsondev_shrtcode_warning_message'); … … 418 418 $text = "This is an error message."; 419 419 } 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>'; 421 421 } 422 422 add_shortcode('errorMessage', 'dobsondev_shrtcode_error_message'); … … 473 473 474 474 475 /* Adds a shortcode for displaying a simple <div> with clear both */ 476 function dobsondev_shrtcode_clear_div($atts) { 477 extract( shortcode_atts( array(), $atts ) ); 478 return '<div style="clear: both;"></div>'; 479 } 480 add_shortcode('divClear', 'dobsondev_shrtcode_clear_div'); 481 482 475 483 /** 476 484 * -
dobsondev-shortcodes/trunk/js/tinymce-plugin.js
r1290205 r1376499 11 11 menu: [{ 12 12 text: 'Embed PDF', 13 icon: 'icon fa fa-file-pdf-o ',13 icon: 'icon fa fa-file-pdf-o dobsondev-shortcodes', 14 14 onclick: function() { 15 15 editor.windowManager.open( { … … 55 55 { 56 56 text: 'Embed GitHub Gist', 57 icon: 'icon fa fa-github ',57 icon: 'icon fa fa-github dobsondev-shortcodes', 58 58 onclick: function() { 59 59 editor.windowManager.open( { … … 80 80 { 81 81 text: 'Embed GitHub Readme', 82 icon: 'icon fa fa-github ',82 icon: 'icon fa fa-github dobsondev-shortcodes', 83 83 onclick: function() { 84 84 editor.windowManager.open( { … … 120 120 { 121 121 text: 'Embed GitHub File', 122 icon: 'icon fa fa-github ',122 icon: 'icon fa fa-github dobsondev-shortcodes', 123 123 onclick: function() { 124 124 editor.windowManager.open( { … … 176 176 { 177 177 text: 'Twitch Stream', 178 icon: 'icon fa fa-twitch ',178 icon: 'icon fa fa-twitch dobsondev-shortcodes', 179 179 onclick: function() { 180 180 editor.windowManager.open( { … … 220 220 { 221 221 text: 'Twitch Chat', 222 icon: 'icon fa fa-twitch ',222 icon: 'icon fa fa-twitch dobsondev-shortcodes', 223 223 onclick: function() { 224 224 editor.windowManager.open( { … … 264 264 { 265 265 text: 'YouTube Video', 266 icon: 'icon fa fa-youtube ',266 icon: 'icon fa fa-youtube dobsondev-shortcodes', 267 267 onclick: function() { 268 268 editor.windowManager.open({ … … 308 308 { 309 309 text: 'Inline Code', 310 icon: 'icon fa fa-code ',310 icon: 'icon fa fa-code dobsondev-shortcodes', 311 311 value: '[startCode][endCode]', 312 312 onclick: function() { … … 316 316 { 317 317 text: 'Code Block', 318 icon: 'icon fa fa-file-code-o ',318 icon: 'icon fa fa-file-code-o dobsondev-shortcodes', 319 319 value: '[codeBlock][endCodeBlock]', 320 320 onclick: function() { … … 324 324 { 325 325 text: 'Button', 326 icon: 'icon fa fa-plus-square ',326 icon: 'icon fa fa-plus-square dobsondev-shortcodes', 327 327 onclick: function() { 328 328 editor.windowManager.open({ … … 391 391 { 392 392 text: 'User Interaction Message', 393 icon: 'icon fa fa-quote-left ',393 icon: 'icon fa fa-quote-left dobsondev-shortcodes', 394 394 onclick: function() { 395 395 editor.windowManager.open({ … … 445 445 { 446 446 text: 'Related Posts', 447 icon: 'icon dashicons-admin-post ',447 icon: 'icon dashicons-admin-post dobsondev-shortcodes', 448 448 value: '[relatedPosts posts=""]', 449 449 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 6 6 Tags: 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 7 7 Requires at least: 2.5 8 Tested up to: 4.4 9 Stable tag: 2.0. 08 Tested up to: 4.4.2 9 Stable tag: 2.0.1 10 10 11 11 Add a collection of helpful shortcodes to your site.
Note: See TracChangeset
for help on using the changeset viewer.