Plugin Directory

Changeset 1225425


Ignore:
Timestamp:
08/19/2015 05:49:09 PM (11 years ago)
Author:
tstephenson
Message:

update compatibility to 4.3 and fix couple of unecessary 404s

Location:
wp-cors/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-cors/trunk/build.xml

    r1002068 r1225425  
    55  <property name="project.name" value="wp-cors"/>
    66  <property name="src" value="${basedir}"/>
    7   <property name="version" value="0.2.0"/>
     7  <property name="version" value="0.2.1"/>
    88  <property name="zipName" value="${project.name}.zip"/>
    99
  • wp-cors/trunk/readme.txt

    r1002068 r1225425  
    33Tags: CORS, REST, AJAX
    44Requires at least: 3.6
    5 Tested up to: 4.0
    6 Stable tag: 0.2
     5Tested up to: 4.3
     6Stable tag: 0.2.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545== Changelog ==
    4646
     47= 0.2.1 =
     48Tested up to WordPress 4.3
     49Minor fixes to avoid 404 on (unnecessary) files.
     50
    4751= 0.2.0 =
    4852
  • wp-cors/trunk/wp-cors.php

    r1002068 r1225425  
    33 * Plugin Name: WP-CORS
    44 * Plugin URI: http://knowprocess.com/wp-plugins/wp-cors
    5  * Description: Simply allows you to control which external domains may make AJAX calls to integrate your content using the CORS standard.
     5 * Description: Simply allows you to control which external domains may make
     6 *   AJAX calls to integrate your content using the CORS standard.
    67 * Author: Tim Stephenson
    7  * Version: 0.2
     8 * Version: 0.2.1
    89 * Author URI: http://knowprocess.com
    910 * License: GPLv2 or later
     
    1112
    1213  define("CORS_ID", 'wp-cors');
    13   define("CORS_VERSION", "0.1.1");
     14  define("CORS_VERSION", "0.2.1");
    1415  define("CORS_NAME", 'CORS');
    1516  define("CORS_DEBUG", false);
     
    2021    add_action( 'admin_init', 'register_cors_admin_settings' );
    2122  } else {
    22     // non-admin enqueues, actions, and filters
    23     // Not sure of the rights and wrongs but wp_enqueue_styles did not work
    24     add_action( 'wp_head', 'cors_load_styles' );
    25     add_action( 'wp_enqueue_scripts', 'cors_load_scripts' );
    2623    add_action( 'send_headers', 'add_cors_header' );
    2724  }
     
    5451  }
    5552
    56   function cors_load_styles() {
    57     if ( is_admin() ) {
    58       wp_enqueue_style(
    59         CORS_ID.'-admin',
    60         plugins_url( 'css/admin-'.CORS_VERSION.'.css', __FILE__ ),
    61         array(),
    62         null /* Force no version as query string */
    63       );
    64     } else {
    65       wp_enqueue_style(
    66         CORS_ID.'-frontend',
    67         plugins_url( 'css/frontend-'.CORS_VERSION.'.css', __FILE__ ),
    68         array(),
    69         null /* Force no version as query string */
    70       );
    71     }
    72   }
    73 
    74   function cors_load_scripts() {
    75     if ( is_admin() ) {
    76       /*
    77       wp_enqueue_script(
    78         'syncapt-plugin-admin',
    79         plugins_url( 'js/admin.js', __FILE__ ),
    80         array( 'jquery' ),
    81         CORS_VERSION
    82       );
    83       */
    84     } else {
    85       wp_enqueue_script(
    86         CORS_ID.'-ui',
    87         plugins_url( 'js/'.CORS_ID.'-'.CORS_VERSION.(CORS_DEBUG ? '' : '.min').'.js', __FILE__ ),
    88         array( 'jquery' ),
    89         null, /* Force no version as query string */
    90         true /* Force load in footer */
    91       );
    92     }
    93   }
    94 
    9553  /** Render the settings / options page in the admin dashboard */
    9654  function cors_options_page() {
     
    10159    <h2><?php echo CORS_NAME; ?> Settings</h2>
    10260    <p>You may enter one or more comma-separated domains to allow access to this site using the CORS standard for authorizing cross site requests.</p>
     61    <p>To allow <em>any</em> site to access yours via CORS put a *, though explicitly listing domains is a better practice for production sites.</p>
    10362    <form method="post" action="options.php">
    10463      <table class="form-table">
Note: See TracChangeset for help on using the changeset viewer.