Changeset 1400491
- Timestamp:
- 04/20/2016 02:37:27 PM (10 years ago)
- Location:
- javascript-autoloader/trunk
- Files:
-
- 1 added
- 1 deleted
- 2 edited
-
languages (deleted)
-
pluginicon.png (added)
-
readme.txt (modified) (3 diffs)
-
sw.cc-js-autoloader.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
javascript-autoloader/trunk/readme.txt
r1230321 r1400491 1 1 === JavaScript AutoLoader === 2 Contributors: smartware.cc 2 Contributors: smartware.cc, petersplugins 3 3 Tags: javascript, jquery, header, footer, wp_enqueue_script, load, autoload 4 4 Requires at least: 2.6 5 Tested up to: 4. 36 Stable tag: 1. 25 Tested up to: 4.5 6 Stable tag: 1.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 To load one ore more JavaScript files at the end of your HTML file just place them into a directory named **footer**. To add the files to the footer of your theme it is required to call wp_footer() in your footer.php. 27 27 28 = Languages =28 = Translations = 29 29 30 * English 31 * German 32 * Spanish (thanks to [Gaston](http://cosa-de-mandinga.blogspot.de)) 30 As of version 1.3 the JavaScript AutoLoader Plugin uses GlotPress - the wordpress.org Translation System - for translations. Translations can be submitted at [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/javascript-autoloader). 33 31 34 **Translat ors welcome!** The languages directory contains POT files to start new translations. Please [contact Author](http://smartware.cc/) if you would like to do a translation.32 **Translation are highly appreciated**. It would be great if you'd support the JavaScript AutoLoader Plugin by adding a new translation or keeping an existing one up to date. If you're new to GlotPress take a look at the [Translator Handbook](https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/). 35 33 36 34 = Do you like the JavaScript AutoLoader Plugin? = … … 66 64 == Changelog == 67 65 66 = 1.3 (2016-04-20) = 67 * translation files removed, using GlotPress exclusively 68 * standardization 69 68 70 = 1.2 (2015-03-11) = 69 71 * Spanish translation -
javascript-autoloader/trunk/sw.cc-js-autoloader.php
r1110498 r1400491 4 4 Plugin URI: http://smartware.cc/free-wordpress-plugins/javascript-autoloader/ 5 5 Description: This Plugin allows you to load additional JavaScript files without the need to change files in the Theme directory. To load additional JavaScript files just put them into a directory named jsautoload. 6 Version: 1. 27 Author: smartware.cc 6 Version: 1.3 7 Author: smartware.cc, Peter's Plugins 8 8 Author URI: http://smartware.cc 9 Text Domain: javascript-autoloader 9 10 License: GPL2 10 11 */ 11 12 12 /* Copyright 201 5 smartware.cc(email : [email protected])13 /* Copyright 2016 Peter Raschendorfer (email : [email protected]) 13 14 14 15 This program is free software; you can redistribute it and/or modify … … 26 27 */ 27 28 29 if ( ! defined( 'WPINC' ) ) { 30 die; 31 } 32 28 33 class Swcc_Javascript_Autoloader { 34 public $plugin_name; 35 public $plugin_slug; 36 public $version; 37 private $wp_url; 38 private $my_url; 29 39 30 40 public function __construct() { 41 $this->plugin_name = 'JavaScript AutoLoader'; 42 $this->plugin_slug = 'javascript-autoloader'; 43 $this->version = '1.3'; 31 44 add_action( 'init', array( $this, 'load' ) ); 32 45 add_action( 'wp_enqueue_scripts', array( $this, 'jsautoloader' ), 999 ); … … 36 49 37 50 function load () { 38 load_plugin_textdomain( 'jsautoload_general', false, basename( dirname( __FILE__ ) ) . '/languages' ); 39 load_plugin_textdomain( 'jsautoload', false, basename( dirname( __FILE__ ) ) . '/languages' ); 51 load_plugin_textdomain( 'javascript-autoloader' ); 40 52 } 41 53 42 54 function admininit() { 43 add_meta_box( 'swcc_jsal_meta_box_like', __( 'Like this Plugin?', 'jsautoload_general' ), array( $this, 'swcc_jsal_add_meta_box_like' ), 'swcc_jsal', 'side' ); 44 add_meta_box( 'swcc_jsal_meta_box_help', __( 'Need help?', 'jsautoload_general' ), array( $this, 'swcc_jsal_add_meta_box_help' ), 'swcc_jsal', 'side' ); 55 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_tool_link' ) ); 56 $this->wp_url = 'https://wordpress.org/plugins/' . $this->plugin_slug; 57 $this->my_url = 'http://smartware.cc/free-wordpress-plugins/' . $this->plugin_slug; 45 58 } 46 59 47 60 // add like meta box 48 function s wcc_jsal_add_meta_box_like() {61 function show_meta_boxes() { 49 62 ?> 50 <ul> 51 <li><div class="dashicons dashicons-wordpress"></div> <a href="https://wordpress.org/plugins/javascript-autoloader/"><?php _e( 'Please rate the plugin', 'jsautoload_general' ); ?></a></li> 52 <li><div class="dashicons dashicons-admin-home"></div> <a href="http://smartware.cc/free-wordpress-plugins/javascript-autoloader/"><?php _e( 'Plugin homepage', 'jsautoload_general'); ?></a></li> 53 <li><div class="dashicons dashicons-admin-home"></div> <a href="http://smartware.cc/"><?php _e( 'Author homepage', 'jsautoload_general' );?></a></li> 54 <li><div class="dashicons dashicons-googleplus"></div> <a href="https://plus.google.com/+SmartwareCc"><?php _e( 'Authors Google+ Page', 'jsautoload_general' ); ?></a></li> 55 <li><div class="dashicons dashicons-facebook-alt"></div> <a href="https://www.facebook.com/smartware.cc"><?php _e( 'Authors facebook Page', 'jsautoload_general' ); ?></a></li> 56 </ul> 57 <?php 58 } 59 60 // add help meta box 61 function swcc_jsal_add_meta_box_help() { 62 ?> 63 <ul> 64 <li><div class="dashicons dashicons-wordpress"></div> <a href="https://wordpress.org/plugins/javascript-autoloader/faq/"><?php _e( 'Take a look at the FAQ section', 'jsautoload_general' ); ?></a></li> 65 <li><div class="dashicons dashicons-wordpress"></div> <a href="https://wordpress.org/plugins/javascript-autoloader"><?php _e( 'Take a look at the Support section', 'jsautoload_general'); ?></a></li> 66 <li><div class="dashicons dashicons-admin-comments"></div> <a href="http://smartware.cc/contact/"><?php _e( 'Feel free to contact the Author', 'jsautoload_general' ); ?></a></li> 67 </ul> 63 <div id="postbox-container-1" class="postbox-container"> 64 <div class="meta-box-sortables"> 65 <div class="postbox"> 66 <h3><span><?php _e( 'Like this Plugin?', 'javascript-autoloader' ); ?></span></h3> 67 <div class="inside"> 68 <ul> 69 <li><div class="dashicons dashicons-wordpress"></div> <a href="<?php echo $this->wp_url; ?>"><?php _e( 'Please rate the plugin', 'javascript-autoloader' ); ?></a></li> 70 <li><div class="dashicons dashicons-admin-home"></div> <a href="<?php echo $this->my_url; ?>"><?php _e( 'Plugin homepage', 'javascript-autoloader'); ?></a></li> 71 <li><div class="dashicons dashicons-admin-home"></div> <a href="http://smartware.cc/"><?php _e( 'Author homepage', 'javascript-autoloader' );?></a></li> 72 <li><div class="dashicons dashicons-googleplus"></div> <a href="http://g.smartware.cc/"><?php _e( 'Authors Google+ Page', 'javascript-autoloader' ); ?></a></li> 73 <li><div class="dashicons dashicons-facebook-alt"></div> <a href="http://f.smartware.cc/"><?php _e( 'Authors facebook Page', 'javascript-autoloader' ); ?></a></li> 74 </ul> 75 </div> 76 </div> 77 <div class="postbox"> 78 <h3><span><?php _e( 'Need help?', 'javascript-autoloader' ); ?></span></h3> 79 <div class="inside"> 80 <ul> 81 <li><div class="dashicons dashicons-wordpress"></div> <a href="<?php echo $this->wp_url; ?>/faq/"><?php _e( 'Take a look at the FAQ section', 'javascript-autoloader' ); ?></a></li> 82 <li><div class="dashicons dashicons-wordpress"></div> <a href="https://wordpress.org/plugins/<?php echo $this->plugin_slug; ?>"><?php _e( 'Take a look at the Support section', 'javascript-autoloader'); ?></a></li> 83 <li><div class="dashicons dashicons-admin-comments"></div> <a href="http://smartware.cc/contact/"><?php _e( 'Feel free to contact the Author', 'javascript-autoloader' ); ?></a></li> 84 </ul> 85 </div> 86 </div> 87 <div class="postbox"> 88 <h3><span><?php _e( 'Translate this Plugin', 'javascript-autoloader' ); ?></span></h3> 89 <div class="inside"> 90 <p><?php _e( 'It would be great if you\'d support the Javascript Autoloader Plugin by adding a new translation or keeping an existing one up to date!', 'javascript-autoloader' ); ?></p> 91 <p><a href="https://translate.wordpress.org/projects/wp-plugins/<?php echo $this->plugin_slug; ?>"><?php _e( 'Translate online', 'javascript-autoloader' ); ?></a></p> 92 </div> 93 </div> 94 </div> 95 </div> 68 96 <?php 69 97 } … … 137 165 ?> 138 166 <div class="wrap"> 139 <?php screen_icon( 'tools' ); ?> 140 <h2>JavaScript AutoLoader</h2> 167 <?php screen_icon(); ?> 168 <h2 style="min-height: 32px; line-height: 32px; padding-left: 40px; background-image: url(<?php echo plugins_url( 'pluginicon.png', __FILE__ ); ?>); background-repeat: no-repeat; background-position: left center"><a href="http://smartware.cc/free-wordpress-plugins/javascript-autoloader/"><?php echo $this->plugin_name; ?></a></h2> 169 <hr /> 170 <p>Plugin Version: <?php echo $this->version; ?> <a class="dashicons dashicons-editor-help" href="https://wordpress.org/plugins/<?php echo $this->plugin_slug; ?>/changelog/"></a></p> 141 171 <div id="poststuff"> 142 172 <div id="post-body" class="metabox-holder columns-2"> … … 144 174 <div class="meta-box-sortables ui-sortable"> 145 175 <div class="postbox"> 146 <h3><span><?php _e( 'Possible paths to store your JavaScript files', 'j sautoload'); ?></span></h3>176 <h3><span><?php _e( 'Possible paths to store your JavaScript files', 'javascript-autoloader'); ?></span></h3> 147 177 <div class="inside"> 148 <h4><?php _e( 'Child Theme Directory', 'j sautoload'); ?></h4>178 <h4><?php _e( 'Child Theme Directory', 'javascript-autoloader'); ?></h4> 149 179 <p><?php 150 180 if ( is_child_theme() ) { 151 echo __( 'Current Path', 'j sautoload' ) . ': <code>' . get_stylesheet_directory() . '/' . $dir . '</code>';181 echo __( 'Current Path', 'javascript-autoloader' ) . ': <code>' . get_stylesheet_directory() . '/' . $dir . '</code>'; 152 182 } else { 153 _e( 'You are not using a Child Theme', 'j sautoload' );183 _e( 'You are not using a Child Theme', 'javascript-autoloader' ); 154 184 } 155 185 ?></p> 156 <h4><?php _e( 'Theme Directory', 'j sautoload'); ?></h4>157 <p><?php echo __( 'Current Path', 'j sautoload' ) . ': <code>' . get_template_directory() . '/' . $dir; ?></code></p>158 <h4><?php _e( 'General Directory', 'j sautoload'); ?></h4>159 <p><?php echo __( 'Current Path', 'j sautoload' ) . ': <code>' . WP_CONTENT_DIR . '/' . $dir; ?></code></p>186 <h4><?php _e( 'Theme Directory', 'javascript-autoloader'); ?></h4> 187 <p><?php echo __( 'Current Path', 'javascript-autoloader' ) . ': <code>' . get_template_directory() . '/' . $dir; ?></code></p> 188 <h4><?php _e( 'General Directory', 'javascript-autoloader'); ?></h4> 189 <p><?php echo __( 'Current Path', 'javascript-autoloader' ) . ': <code>' . WP_CONTENT_DIR . '/' . $dir; ?></code></p> 160 190 </div> 161 191 <hr /> 162 <h3><span><?php _e( 'Currently loaded JavaScript files (in that order)', 'j sautoload'); ?></span></h3>192 <h3><span><?php _e( 'Currently loaded JavaScript files (in that order)', 'javascript-autoloader'); ?></span></h3> 163 193 <div class="inside"> 164 194 <?php $this->showcurrent(); ?> … … 167 197 </div> 168 198 </div> 169 <div id="postbox-container-1" class="postbox-container"> 170 <?php do_meta_boxes( 'swcc_jsal', 'side', true ); ?> 171 </div> 199 <?php $this->show_meta_boxes(); ?> 172 200 </div> 173 201 <br class="clear" /> 174 202 </div> 175 <br id="two_column" class="clear" />176 203 </div> 177 <div class="clear"></div>178 204 <? 179 205 } … … 183 209 $filesarray = $this->getAllFiles(); 184 210 if ( empty( $filesarray ) ) { 185 echo '<p> no files loaded currently</p>';211 echo '<p>' . __( 'no files loaded currently', 'javascript-autoloader' ) . '</p>'; 186 212 } else { 187 213 $loc = -1; … … 189 215 if ( $file['footer'] != $loc) { 190 216 if ( $file['footer'] == 0) { 191 echo '<p><strong>' . __('in Header', 'j sautoload' ) . '</strong></p>';217 echo '<p><strong>' . __('in Header', 'javascript-autoloader' ) . '</strong></p>'; 192 218 echo '<ul>'; 193 219 } else { … … 196 222 } 197 223 echo '<ul>'; 198 echo '<p><strong>' . __( 'in Footer (be sure to call wp_footer() in your footer template!)', 'j sautoload' ) . '</strong></p>';224 echo '<p><strong>' . __( 'in Footer (be sure to call wp_footer() in your footer template!)', 'javascript-autoloader' ) . '</strong></p>'; 199 225 } 200 226 $loc = $file['footer']; … … 218 244 add_management_page( 'WP JS AutoLoader', 'JS AutoLoader', 'activate_plugins', 'wpjsautoloader', array( $this, 'showadmin' ) ); 219 245 } 246 247 // add a link to tool page in plugin list 248 function add_tool_link( $links ) { 249 return array_merge( $links, array( '<a href="' . admin_url( 'tools.php?page=wpjsautoloader' ) . '">' . __( 'Show files', 'javascript-autoloader' ) . '</a>') ); 250 } 251 220 252 } 221 253
Note: See TracChangeset
for help on using the changeset viewer.