Changeset 1240232
- Timestamp:
- 09/07/2015 11:14:01 PM (11 years ago)
- Location:
- my-optional-modules/trunk
- Files:
-
- 6 edited
-
admin.settings-page-content.php (modified) (5 diffs)
-
class.mom-mediaembed.php (modified) (3 diffs)
-
class.myoptionalmodules-shortcodes.php (modified) (4 diffs)
-
includes/css/myoptionalmodules10.css (modified) (2 diffs)
-
plugin.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
my-optional-modules/trunk/admin.settings-page-content.php
r1233006 r1240232 3 3 * ADMIN Settings Page Content 4 4 * 5 * File last update: 10.1. 0.25 * File last update: 10.1.3 6 6 * 7 7 * Content of the /wp-admin/ SETTINGS PAGE for this plugin … … 189 189 ' Disable Plugin CSS <em>Keeps this plugins CSS from enqueueing. You will need to manually style all plugin elements yourself.</em>' , 190 190 ' Disable Plugin Script <em>Keeps this plugins main jquery script from loading. You will lose some functionality.</em>' , 191 ' Disable Plugin Shortcodes <em>You may choose to disable the file class.myoptionalmodules-shortcodes.php in its entirety. [mom_embed], [mom_hidden], and [mom_charts] will no longer work.</em>' ,191 ' Disable Plugin Shortcodes <em>You may choose to disable the file class.myoptionalmodules-shortcodes.php in its entirety. [mom_embed], [mom_hidden], [mom_charts], and [mom_categories] will no longer work.</em>' , 192 192 ' Disable Comment form <em>Removes the comment form from every portion of your site, and replaces it with a blank template.</em>' , 193 193 ' Remove Unnecessary Code <em>Removes the XHTML generator, CSS and JS ids, feed links, Really Simple Discovery link, WLW Manifest link, adjacent posts links, and other such code clutter.</em>' , … … 256 256 'myoptionalmodules_sharelinks_text' , 257 257 'myoptionalmodules_google' , 258 'myoptionalmodules_custom_embed' , 259 'myoptionalmodules_custom_hidden' , 260 'myoptionalmodules_custom_charts' , 261 'myoptionalmodules_custom_categories' , 258 262 'myoptionalmodules_verification' , 259 263 'myoptionalmodules_alexa' , … … 264 268 'myoptionalmodules_disqus' , 265 269 'myoptionalmodules_miniloopstyle' , 266 'myoptionalmodules_miniloopamount' 270 'myoptionalmodules_miniloopamount' 267 271 ); 268 272 $options_exclude = array ( … … 537 541 echo ' 538 542 </select></section>'; 539 $google = $previousclass = $nextclass = $readmore = $randompost = null; 540 $google = sanitize_text_field ( get_option ( 'myoptionalmodules_google' ) ); 541 $verification = sanitize_text_field ( get_option ( 'myoptionalmodules_verification' ) ); 542 $alexa = sanitize_text_field ( get_option ( 'myoptionalmodules_alexa' ) ); 543 $bing = sanitize_text_field ( get_option ( 'myoptionalmodules_bing' ) ); 544 $previousclass = sanitize_text_field ( get_option ( 'myoptionalmodules_previouslinkclass' ) ); 545 $nextclass = sanitize_text_field ( get_option ( 'myoptionalmodules_nextlinkclass' ) ); 546 $randompost = sanitize_text_field ( get_option ( 'myoptionalmodules_randompost' ) ); 547 $miniloop_meta = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopmeta' ) ); 548 $miniloop_style = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopstyle' ) ); 549 $miniloop_amount = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopamount' ) ); 550 $disqus = sanitize_text_field ( get_option ( 'myoptionalmodules_disqus' ) ); 543 $google = $verification = $alexa = 544 $bing = $randompost = $miniloop_meta = 545 $miniloop_style = $miniloop_amount = $disqus = 546 $shortcode_embed = $shortcode_hidden = $shortcode_charts = 547 $shortcode_categories = null; 548 549 $google = sanitize_text_field ( get_option ( 'myoptionalmodules_google' ) ); 550 $verification = sanitize_text_field ( get_option ( 'myoptionalmodules_verification' ) ); 551 $alexa = sanitize_text_field ( get_option ( 'myoptionalmodules_alexa' ) ); 552 $bing = sanitize_text_field ( get_option ( 'myoptionalmodules_bing' ) ); 553 $randompost = sanitize_text_field ( get_option ( 'myoptionalmodules_randompost' ) ); 554 $miniloop_meta = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopmeta' ) ); 555 $miniloop_style = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopstyle' ) ); 556 $miniloop_amount = sanitize_text_field ( get_option ( 'myoptionalmodules_miniloopamount' ) ); 557 $disqus = sanitize_text_field ( get_option ( 'myoptionalmodules_disqus' ) ); 558 $shortcode_embed = sanitize_text_field ( get_option ( 'myoptionalmodules_custom_embed' ) ); 559 $shortcode_hidden = sanitize_text_field ( get_option ( 'myoptionalmodules_custom_hidden' ) ); 560 $shortcode_charts = sanitize_text_field ( get_option ( 'myoptionalmodules_custom_charts' ) ); 561 $shortcode_categories = sanitize_text_field ( get_option ( 'myoptionalmodules_custom_categories' ) ); 562 551 563 echo " 564 <section><hr /><strong>Shortcode Customization</strong></section> 565 <section> 566 <label for='myoptionalmodules_custom_embed'>Embed shortcode parameter <small>— default: mom_embed</small> 567 <input class='full-text' type='text' id='myoptionalmodules_custom_embed' name='myoptionalmodules_custom_embed' value='{$shortcode_embed}' /> 568 </section> 569 <section> 570 <label for='myoptionalmodules_custom_hidden'>Hidden shortcode parameter <small>— default: mom_hidden</small> 571 <input class='full-text' type='text' id='myoptionalmodules_custom_hidden' name='myoptionalmodules_custom_hidden' value='{$shortcode_hidden}' /> 572 </section> 573 <section> 574 <label for='myoptionalmodules_custom_charts'>Charts shortcode parameter <small>— default: mom_charts</small> 575 <input class='full-text' type='text' id='myoptionalmodules_custom_charts' name='myoptionalmodules_custom_charts' value='{$shortcode_charts}' /> 576 </section> 577 <section> 578 <label for='myoptionalmodules_custom_categories'>Categories shortcode parameter <small>— default: mom_categories</small> 579 <input class='full-text' type='text' id='myoptionalmodules_custom_categories' name='myoptionalmodules_custom_categories' value='{$shortcode_categories}' /> 580 </section> 581 <section><hr /></section> 582 583 584 552 585 <section> 553 586 <label for='myoptionalmodules_disqus'>Disqus Shortname <small>— <strong>this</strong>.disqus.com</small> <em>Enables Disqus comments for your posts.</em></label> -
my-optional-modules/trunk/class.mom-mediaembed.php
r1233006 r1240232 3 3 * CLASS mom_mediaEmbed() 4 4 * 5 * File last update: 10. 0.9.55 * File last update: 10.1.3 6 6 * 7 7 * Create a media embed from a URL in a template (or other) by passing a … … 131 131 $url = sanitize_text_field ( $url ); 132 132 if ( strpos ( $path , '/a/' ) !== false ): 133 $output .= "< iframe class='imgur-album' src='//imgur.com/a/{$url}/embed'></iframe>";133 $output .= "<blockquote class='imgur-embed-pub' lang='en' data-id='a/{$url}'></blockquote><script async src='//s.imgur.com/min/embed.js' charset='utf-8'></script>"; 134 134 elseif ( strpos ( $path , '/gallery/' ) !== false ): 135 135 $url = str_replace ( 'imgur.com/gallery/' , '' , $url ); 136 $output .= "< div class='imgur-iframe'><blockquote class='imgur-embed-pub' lang='en' data-id='{$url}' data-context='false'><a rel='nofollow' href='//imgur.com/{$url}'>View post on imgur.com</a></blockquote><script async src='//s.imgur.com/min/embed.js' charset='utf-8'></script></div>";136 $output .= "<blockquote class='imgur-embed-pub' lang='en' data-id='a/{$url}'></blockquote><script async src='//s.imgur.com/min/embed.js' charset='utf-8'></script>"; 137 137 else: 138 138 $ext = pathinfo($url, PATHINFO_EXTENSION); … … 265 265 endif; 266 266 267 if ( $gumboard_user_disable_img ): 268 echo "<div class='{$class}'>"; 269 echo "<p><a rel='nofollow' href='{$original_url}'>Attachment</a> <small>— you currently have embeds turned off.</small></p>"; 270 $output = null; 267 if ( $output ): 268 if ( 'user_info_image' != $class ): 269 echo "<div class='embed'>"; 270 echo $output; 271 else: 272 echo '<div class="user_info_image">'; 273 echo $output; 274 endif; 271 275 echo '</div>'; 272 276 else: 273 if ( $output ): 274 if ( 'user_info_image' != $class ): 275 echo "<div class='embed'>"; 276 echo $output; 277 else: 278 echo '<div class="user_info_image">'; 279 echo $output; 280 endif; 281 echo '</div>'; 282 else: 283 echo "<div class='gumboard_content_comment'><p><a rel='nofollow' href='{$url}'>Attached link</a> <small>(<a href='//{$host}'>{$host}</a>)</small></p></div>"; 284 endif; 285 endif; 277 echo "<div class='gumboard_content_comment'><p><a rel='nofollow' href='{$url}'>Attached link</a> <small>(<a href='//{$host}'>{$host}</a>)</small></p></div>"; 278 endif; 279 286 280 287 281 endif; -
my-optional-modules/trunk/class.myoptionalmodules-shortcodes.php
r1222674 r1240232 3 3 * CLASS myoptionalmodules_shortcodes() 4 4 * 5 * File last update: 10.0.9.65 * File update: 10.1.3 6 6 * 7 7 * All shortcodes for My Optional Modules … … 15 15 16 16 function __construct() { 17 remove_shortcode ( 'mom_embed' ); 18 remove_shortcode ( 'mom_hidden' ); 19 remove_shortcode ( 'mom_charts' ); 20 21 add_shortcode ( 'mom_embed' , array ( $this , 'embed' ) ); 22 add_shortcode ( 'mom_hidden' , array ( $this , 'hidden' ) ); 23 add_shortcode ( 'mom_charts' , array ( $this , 'charts' ) ); 17 18 /** 19 * Customize shortcode code 20 */ 21 22 global $myoptionalmodules_custom_embed; 23 global $myoptionalmodules_custom_hidden; 24 global $myoptionalmodules_custom_charts; 25 global $myoptionalmodules_custom_categories; 26 27 if( !$myoptionalmodules_custom_embed ){ 28 $myoptionalmodules_custom_embed = 'mom_embed'; 29 } 30 if( !$myoptionalmodules_custom_hidden ){ 31 $myoptionalmodules_custom_hidden = 'mom_hidden'; 32 } 33 if( !$myoptionalmodules_custom_charts ){ 34 $myoptionalmodules_custom_charts = 'mom_charts'; 35 } 36 if( !$myoptionalmodules_custom_categories ){ 37 $myoptionalmodules_custom_categories = 'mom_categories'; 38 } 39 40 remove_shortcode ( $myoptionalmodules_custom_embed ); 41 remove_shortcode ( $myoptionalmodules_custom_hidden ); 42 remove_shortcode ( $myoptionalmodules_custom_charts ); 43 remove_shortcode ( $myoptionalmodules_custom_categories ); 44 add_shortcode ( $myoptionalmodules_custom_embed , array ( $this , 'embed' ) ); 45 add_shortcode ( $myoptionalmodules_custom_hidden , array ( $this , 'hidden' ) ); 46 add_shortcode ( $myoptionalmodules_custom_charts , array ( $this , 'charts' ) ); 47 add_shortcode ( $myoptionalmodules_custom_categories , array ( $this , 'categories' ) ); 24 48 } 25 49 … … 85 109 } 86 110 87 function charts ( $atts ) {111 function charts( $atts ) { 88 112 89 113 /* … … 163 187 } 164 188 return $output; 165 } 189 } 190 191 function categories() { 192 $output = null; 193 $output .= '<div class="mom_cat-container">'; 194 $args = array( 195 'orderby' => 'name', 196 'parent' => 0 197 ); 198 $categories = get_categories( $args ); 199 foreach ( $categories as $category ) { 200 $link = get_category_link( $category->term_id ); 201 $output .= "<div class='mom_cat-containers'><span><strong><a href='{$link}'>{$category->name}</a></strong></span>{$category->description}</div>"; 202 } 203 $output .= '</div>'; 204 205 return $output; 206 } 166 207 } 167 208 $myoptionalmodules_shortcodes = new myoptionalmodules_shortcodes(); -
my-optional-modules/trunk/includes/css/myoptionalmodules10.css
r1229384 r1240232 1 .mom_minilist *:before, .mom_minilist *:after, .mom_minilist *,#mom_onthisday *:before,#mom_onthisday *:after, #mom_onthisday *,.mom_postrotation *:before, .mom_postrotation *:after, .mom_postrotation * { 2 box-sizing: border-box; 3 -moz-box-sizing: border-box; 4 -webkit-box-sizing: border-box; 5 } 1 /** 2 * [mom_categories] 3 */ 4 .mom_cat-container { 5 clear: both; 6 display: block; 7 font-size: 1rem; 8 margin: 20px auto; 9 overflow-x: hidden; 10 overflow-y: auto; 11 padding: 5% 10%; 12 } 13 .mom_cat-container span { 14 font-weight: 700; 15 } 16 .mom_cat-container a, 17 .mom_cat-container span { 18 border-bottom: 1px solid rgba(0,0,0,0); 19 clear: both; 20 display: block; 21 margin: 5px 0; 22 } 23 .mom_cat-container a:hover { 24 border-bottom: 1px solid rgba(0,0,0,.1); 25 } 26 .mom_cat-containers { 27 float: left; 28 padding: 10px 10px 20px; 29 width: 25%; 30 } 31 6 32 7 33 /** … … 671 697 z-index: 0!important; 672 698 } 699 700 @media screen and (max-width: 55.250em) { 701 .mom_cat-container { 702 clear: both; 703 display: block; 704 font-size: 1rem; 705 margin: auto; 706 overflow-x: hidden; 707 overflow-y: auto; 708 padding: 4.5454% 9.0909%; 709 } 710 .mom_cat-container span { 711 clear: both; 712 display: block; 713 margin: 5px 0; 714 } 715 .mom_cat-containers { 716 width: 33%; 717 } 718 } 719 720 @media screen and (max-width: 31.250em ) { 721 .mom_cat-container { 722 clear: both; 723 display: block; 724 font-size: 1rem; 725 margin: auto; 726 overflow-x: hidden; 727 overflow-y: auto; 728 padding: 10px 35px; 729 } 730 .mom_cat-container span { 731 clear: both; 732 display: block; 733 margin: 5px 0; 734 } 735 .mom_cat-containers { 736 width: 50%; 737 } 738 } 739 740 @media screen and (max-width: 21.250em ) { 741 .mom_cat-container { 742 clear: both; 743 display: block; 744 font-size: 1rem; 745 margin: auto; 746 overflow-x: hidden; 747 overflow-y: auto; 748 padding: 10px; 749 } 750 .mom_cat-container span { 751 clear: both; 752 display: block; 753 margin: 5px 0; 754 } 755 .mom_cat-containers { 756 width: 100%; 757 } 758 } -
my-optional-modules/trunk/plugin.php
r1233006 r1240232 4 4 Plugin URI: 5 5 Description: Optional modules and additions for Wordpress. 6 Version: 10.1. 0.26 Version: 10.1.3 7 7 Author: boyevul 8 8 Author URI: … … 62 62 $myoptionalmodules_exclude_usersuserswed = $myoptionalmodules_exclude_usersusersthu = $myoptionalmodules_exclude_usersusersfri = 63 63 $myoptionalmodules_exclude_usersuserssat = $myoptionalmodules_disqus = $myoptionalmodules_pluginscript = 64 $myoptionalmodules_analyticspostsonly = $myoptionalmodules_pluginshortcodes = null; 64 $myoptionalmodules_analyticspostsonly = $myoptionalmodules_pluginshortcodes = 65 $myoptionalmodules_custom_embed = $myoptionalmodules_custom_hidden = $myoptionalmodules_custom_charts = 66 $myoptionalmodules_custom_categories = null; 65 67 66 68 … … 167 169 if( $name == 'myoptionalmodules_verification' && $value ): $myoptionalmodules_verification = $value; endif; 168 170 if( $name == 'myoptionalmodules_randompost' && $value ): $myoptionalmodules_randompost = esc_html ( $value ); endif; 169 171 172 if( $name == 'myoptionalmodules_custom_embed' && $value ): $myoptionalmodules_custom_embed = $value; endif; 173 if( $name == 'myoptionalmodules_custom_hidden' && $value ): $myoptionalmodules_custom_hidden = $value; endif; 174 if( $name == 'myoptionalmodules_custom_charts' && $value ): $myoptionalmodules_custom_charts = $value; endif; 175 if( $name == 'myoptionalmodules_custom_categories' && $value ): $myoptionalmodules_custom_categories = $value; endif; 176 170 177 // Exclude Posts 171 178 if( $name == 'myoptionalmodules_exclude_categories_level0categories' && $value ): $myoptionalmodules_exclude_categories_level0categories = $value; endif; -
my-optional-modules/trunk/readme.txt
r1233006 r1240232 4 4 Requires at least: 4.1 5 5 Tested up to: 4.3 6 Stable tag: 10.1. 0.26 Stable tag: 10.1.3 7 7 8 8 An assortment of functions to enhance WordPress. … … 90 90 while overall determines if the overall score is to be displayed. 91 91 92 = [mom_categories] = 93 Creates a display column(s) of all parent categories, with links, and descriptions of each. 94 92 95 == Screenshots == 93 96 1. A horizontal gallery in a post. … … 95 98 96 99 == Changelog == 100 = 10.1.3 = 101 * *Release Date - 7th, September, 2015* 102 * (added) [mom_categories] shortcode (parent category display) 103 * [mom_embed] imgur album/gallery display code update to current (official) embed code 104 * Customize shortcode [code] (some restrictions may apply, with regards to words WordPress uses internally) 105 97 106 = 10.1.0.2 = 98 107 * *Release Date - 28th, August, 2015*
Note: See TracChangeset
for help on using the changeset viewer.