Plugin Directory

Changeset 1501662


Ignore:
Timestamp:
09/23/2016 11:49:11 PM (10 years ago)
Author:
wassereimer
Message:

New Version 3.2.1 for Trunk

Location:
easy-code-placement/trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • easy-code-placement/trunk/easy-code-placement.php

    r1420409 r1501662  
    44 * Text Domain: easy-code-placement
    55 * Domain Path: /lang
    6  * Version: 3.2
     6 * Version: 3.2.1
    77 * Plugin URI: http://www.randnotizen.org/easy-code-placement/
    88 * Author: Jens Herdy
     
    1515ob_start();
    1616define('ECP_FILE',__FILE__);
    17 define('ECP_VERSION','3.2');
     17define('ECP_VERSION','3.2.1');
    1818
    1919// load functions, classes
  • easy-code-placement/trunk/inc/content.php

    r1420409 r1501662  
    99$ecp_codes = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}ecp_data LIMIT $ecp_calc, $ecp_perpage" );
    1010$ecp_num_pages = ceil( $ecp_total_rows / $ecp_perpage );
    11 
    12 // generate var to get back on correct page after changing something
    13 if ($ecp_pagenum != '1') {
    14     $ecp_sendpage = '&pagenum='.$ecp_pagenum.'';
    15 } else {
    16     $ecp_sendpage = '';
    17 }
     11$ecp_sendpage = '&pagenum='.$ecp_pagenum.'';
    1812
    1913$ecp_pagination = paginate_links( array(
  • easy-code-placement/trunk/inc/functions.php

    r1420409 r1501662  
    7777}
    7878
    79 // update to 3.2
     79// update to 3.2.1
    8080function ecp_update(){
    8181    // multiside update
     
    8686        foreach ($blogids as $blogid) {
    8787            switch_to_blog($blogid);
    88             $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_data ADD COLUMN added TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER status");
    89             $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_data ADD COLUMN changed TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER added");
    90             $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.2'");
    91             $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.2' ), array( 'option_name' => 'version' ));
     88            ecp_install();
     89            $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.2.1'");
     90            $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.2.1' ), array( 'option_name' => 'version' ));
    9291        }
    9392    switch_to_blog($blog);
    94         } else {
    95     // single update
    96     global $wpdb;
    97         $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_data ADD COLUMN added TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER status");
    98         $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_data ADD COLUMN changed TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER added");
    99         $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.2'");
    100         $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.2' ), array( 'option_name' => 'version' ));
     93    } else {
     94        // single update
     95        global $wpdb;
     96        $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.2.1'");
     97        $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.2.1' ), array( 'option_name' => 'version' ));
    10198    }
    10299}
     
    108105    if (! is_admin()) {
    109106        return;
    110     } elseif ($ecp_options_version === '3.2') {
     107    } elseif ($ecp_options_version === '3.2.1') {
    111108        return;
    112109    } else {
     
    116113}
    117114
    118 // add tables and data in it when a new blog is created
    119 function ecp_new_blog($blog_id) {
    120     if ( is_plugin_active_for_network( 'easy-code-placement/easy-code-placement.php' ) ) {
    121         switch_to_blog($blog_id);
    122         ecp_install();
    123         restore_current_blog();
    124     }
    125 }
    126 
    127 // tell wordpress what to do when adding a new blog
    128 add_action ( 'wpmu_new_blog', 'ecp_new_blog', 99 );
    129 
    130 // delete tables and data when a blog is deleted
    131 function ecp_deleted_blog($tables) {
    132     global $wpdb;
    133     $tables[] = $wpdb->prefix.'ecp_options';
    134     $tables[] = $wpdb->prefix.'ecp_data';
    135     return $tables;
    136 }
    137 add_filter ( 'wpmu_drop_tables', 'ecp_deleted_blog', 99 );
    138 
    139115?>
  • easy-code-placement/trunk/inc/install.php

    r1420409 r1501662  
    3232// multiside or single installation?
    3333function ecp_net_inst($networkwide) {
    34     // check if an installation already exist
    3534    global $wpdb;
    36     $ecp_find = $wpdb->prefix.'ecp_options';
    37     if($wpdb->get_var("SHOW TABLES LIKE '$ecp_find'") != $ecp_find) {
    38         // multiside installation
    39         if (is_multisite() && $networkwide) {
    40             $blog = $wpdb->blogid;
    41             $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
    42             foreach ($blogids as $blogid) {
    43                 switch_to_blog($blogid);
    44                 ecp_install();
    45             }
    46         switch_to_blog($blog);
    47         } else {
     35    // multiside installation
     36    if (is_multisite() && $networkwide) {
     37        $blog = $wpdb->blogid;
     38        $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
     39        foreach ($blogids as $blogid) {
     40            switch_to_blog($blogid);
     41            ecp_install();
     42        }
     43    switch_to_blog($blog);
     44    } else {
    4845        // single installation 
    4946        ecp_install();
    50         }
    5147    }
    5248}
     
    5551register_activation_hook ( ECP_FILE, 'ecp_net_inst' );
    5652
     53// add tables and data in it when a new blog is created
     54function ecp_new_blog($blog_id) {
     55    if ( is_plugin_active_for_network( 'easy-code-placement/easy-code-placement.php' ) ) {
     56        switch_to_blog($blog_id);
     57        ecp_install();
     58        restore_current_blog();
     59    }
     60}
     61
     62// tell wordpress what to do when adding a new blog
     63add_action ( 'wpmu_new_blog', 'ecp_new_blog', 99 );
     64
    5765?>
  • easy-code-placement/trunk/inc/uninstall.php

    r1227126 r1501662  
    3030register_uninstall_hook ( ECP_FILE, 'ecp_net_uninstall' );
    3131
     32// delete tables and data when a blog is deleted
     33function ecp_deleted_blog($tables) {
     34    global $wpdb;
     35    $tables[] = $wpdb->prefix.'ecp_options';
     36    $tables[] = $wpdb->prefix.'ecp_data';
     37    return $tables;
     38}
     39add_filter ( 'wpmu_drop_tables', 'ecp_deleted_blog', 99 );
     40
    3241?>
  • easy-code-placement/trunk/readme.txt

    r1420409 r1501662  
    44Tags: ad, add, addthis, ads, adsense, adsense plugin, advertising, affilimatch, affilinet, align, alignment, amazon associates, any, audio, clicksor, code, codes, css, easy, flash, google, google adsense, html, infolinks, insert, java, javascript, multisite, network, offline, online, page, pages, php, place, placement, plugin, post, posts, shortcode, shortcodes, snippet, snippets, text, video, widget
    55Requires at least: 3.0.1
    6 Tested up to: 4.5.2
    7 Stable tag: 3.2
     6Tested up to: 4.6.1
     7Stable tag: 3.2.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    8383== Changelog ==
    8484
     85= 3.2.1 =
     86* 23.09.2016
     87* Compatibility check for WordPress Version 4.6.1
     88* Fixed a Problem where the Back Button didn´t work
     89* Fixed an Error which caused that the Plugin didn´t work on Network-Sites
     90
    8591= 3.2 =
    8692* 19.05.2016
Note: See TracChangeset for help on using the changeset viewer.