Plugin Directory

Changeset 1400491


Ignore:
Timestamp:
04/20/2016 02:37:27 PM (10 years ago)
Author:
smartware.cc
Message:

Version 1.3 pre-release

Location:
javascript-autoloader/trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • javascript-autoloader/trunk/readme.txt

    r1230321 r1400491  
    11=== JavaScript AutoLoader ===
    2 Contributors: smartware.cc
     2Contributors: smartware.cc, petersplugins
    33Tags: javascript, jquery, header, footer, wp_enqueue_script, load, autoload
    44Requires at least: 2.6
    5 Tested up to: 4.3
    6 Stable tag: 1.2
     5Tested up to: 4.5
     6Stable tag: 1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2626To 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.
    2727
    28 = Languages =
     28= Translations =
    2929
    30 * English
    31 * German
    32 * Spanish (thanks to [Gaston](http://cosa-de-mandinga.blogspot.de))
     30As 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).
    3331
    34 **Translators 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/).
    3533
    3634= Do you like the JavaScript AutoLoader Plugin? =
     
    6664== Changelog ==
    6765
     66= 1.3 (2016-04-20) =
     67* translation files removed, using GlotPress exclusively
     68* standardization
     69
    6870= 1.2 (2015-03-11) =
    6971* Spanish translation
  • javascript-autoloader/trunk/sw.cc-js-autoloader.php

    r1110498 r1400491  
    44Plugin URI: http://smartware.cc/free-wordpress-plugins/javascript-autoloader/
    55Description: 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.2
    7 Author: smartware.cc
     6Version: 1.3
     7Author: smartware.cc, Peter's Plugins
    88Author URI: http://smartware.cc
     9Text Domain: javascript-autoloader
    910License: GPL2
    1011*/
    1112
    12 /*  Copyright 2015  smartware.cc (email : [email protected])
     13/*  Copyright 2016 Peter Raschendorfer (email : [email protected])
    1314
    1415    This program is free software; you can redistribute it and/or modify
     
    2627*/
    2728
     29if ( ! defined( 'WPINC' ) ) {
     30    die;
     31}
     32
    2833class Swcc_Javascript_Autoloader {
     34  public $plugin_name;
     35  public $plugin_slug;
     36  public $version;
     37  private $wp_url;
     38  private $my_url;
    2939
    3040  public function __construct() {
     41    $this->plugin_name = 'JavaScript AutoLoader';
     42    $this->plugin_slug = 'javascript-autoloader';
     43        $this->version = '1.3';
    3144    add_action( 'init', array( $this, 'load' ) );
    3245    add_action( 'wp_enqueue_scripts', array( $this, 'jsautoloader' ), 999 );
     
    3649 
    3750  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' );
    4052  }
    4153 
    4254  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;
    4558  }
    4659 
    4760  // add like meta box
    48   function swcc_jsal_add_meta_box_like() {
     61  function show_meta_boxes() {
    4962    ?>
    50     <ul>
    51       <li><div class="dashicons dashicons-wordpress"></div>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<a href="http://smartware.cc/"><?php _e( 'Author homepage', 'jsautoload_general' );?></a></li>
    54       <li><div class="dashicons dashicons-googleplus"></div>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<a href="<?php echo $this->my_url; ?>"><?php _e( 'Plugin homepage', 'javascript-autoloader'); ?></a></li>
     71              <li><div class="dashicons dashicons-admin-home"></div>&nbsp;&nbsp;<a href="http://smartware.cc/"><?php _e( 'Author homepage', 'javascript-autoloader' );?></a></li>
     72              <li><div class="dashicons dashicons-googleplus"></div>&nbsp;&nbsp;<a href="http://g.smartware.cc/"><?php _e( 'Authors Google+ Page', 'javascript-autoloader' ); ?></a></li>
     73              <li><div class="dashicons dashicons-facebook-alt"></div>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>
    6896    <?php
    6997  }
     
    137165    ?>
    138166    <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>
    141171      <div id="poststuff">
    142172        <div id="post-body" class="metabox-holder columns-2">
     
    144174            <div class="meta-box-sortables ui-sortable">
    145175              <div class="postbox">
    146                 <h3><span><?php _e( 'Possible paths to store your JavaScript files', 'jsautoload'); ?></span></h3>
     176                <h3><span><?php _e( 'Possible paths to store your JavaScript files', 'javascript-autoloader'); ?></span></h3>
    147177                <div class="inside">
    148                   <h4><?php _e( 'Child Theme Directory', 'jsautoload'); ?></h4>
     178                  <h4><?php _e( 'Child Theme Directory', 'javascript-autoloader'); ?></h4>
    149179                  <p><?php
    150180                    if ( is_child_theme() ) {
    151                       echo __( 'Current Path', 'jsautoload' ) . ': <code>' . get_stylesheet_directory() . '/' . $dir . '</code>';
     181                      echo __( 'Current Path', 'javascript-autoloader' ) . ': <code>' . get_stylesheet_directory() . '/' . $dir . '</code>';
    152182                    } else {
    153                       _e( 'You are not using a Child Theme', 'jsautoload' );
     183                      _e( 'You are not using a Child Theme', 'javascript-autoloader' );
    154184                    }
    155185                  ?></p>
    156                   <h4><?php _e( 'Theme Directory', 'jsautoload'); ?></h4>
    157                   <p><?php echo __( 'Current Path', 'jsautoload' ) . ': <code>' . get_template_directory() . '/' . $dir; ?></code></p>
    158                   <h4><?php _e( 'General Directory', 'jsautoload'); ?></h4>
    159                   <p><?php echo __( 'Current Path', 'jsautoload' ) . ': <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>
    160190                </div>
    161191                <hr />
    162                 <h3><span><?php _e( 'Currently loaded JavaScript files (in that order)', 'jsautoload'); ?></span></h3>
     192                <h3><span><?php _e( 'Currently loaded JavaScript files (in that order)', 'javascript-autoloader'); ?></span></h3>
    163193                <div class="inside">
    164194                  <?php $this->showcurrent(); ?>
     
    167197            </div>
    168198          </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(); ?>
    172200        </div>
    173201        <br class="clear" />
    174202      </div>   
    175       <br id="two_column" class="clear" />
    176203    </div>
    177     <div class="clear"></div>
    178204    <?
    179205  }
     
    183209    $filesarray = $this->getAllFiles(); 
    184210    if ( empty( $filesarray ) ) {
    185       echo '<p>no files loaded currently</p>';
     211      echo '<p>' . __( 'no files loaded currently', 'javascript-autoloader' ) . '</p>';
    186212    } else {
    187213    $loc = -1;
     
    189215        if ( $file['footer'] != $loc) {
    190216          if ( $file['footer'] == 0) {
    191             echo '<p><strong>' . __('in Header', 'jsautoload' ) . '</strong></p>';
     217            echo '<p><strong>' . __('in Header', 'javascript-autoloader' ) . '</strong></p>';
    192218            echo '<ul>';
    193219          } else {
     
    196222            }
    197223            echo '<ul>';
    198             echo '<p><strong>' . __( 'in Footer (be sure to call wp_footer() in your footer template!)', 'jsautoload' ) . '</strong></p>';
     224            echo '<p><strong>' . __( 'in Footer (be sure to call wp_footer() in your footer template!)', 'javascript-autoloader' ) . '</strong></p>';
    199225          }
    200226          $loc = $file['footer'];
     
    218244    add_management_page( 'WP JS AutoLoader', 'JS AutoLoader', 'activate_plugins', 'wpjsautoloader', array( $this, 'showadmin' ) );
    219245  }
     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 
    220252}
    221253
Note: See TracChangeset for help on using the changeset viewer.