Plugin Directory

Changeset 1718028


Ignore:
Timestamp:
08/23/2017 09:37:44 AM (9 years ago)
Author:
weslink
Message:

update language files

Location:
wl-gravity-forms-german-address-format/trunk
Files:
2 edited
3 moved

Legend:

Unmodified
Added
Removed
  • wl-gravity-forms-german-address-format/trunk/readme.txt

    r1717999 r1718028  
    3636* Einreichen der erste Versions auf WordPress.org
    3737
     38= 1.0.1 =
     39* Deutsche Sprachdatei geupdated
     40
    3841== Upgrade Notice ==
    3942
    4043= 1.0.0 =
    4144* Einreichen der erste Versions auf WordPress.org
     45
     46= 1.0.0 =
     47* Deutsche Sprachdatei geupdated
    4248
    4349== Contribute ==
  • wl-gravity-forms-german-address-format/trunk/wl-gf-german-address-format.php

    r1717953 r1718028  
    33Plugin Name: WL Gravity Forms - German Address Format
    44Description: This Plugin changes the order of the city and the zip code for the german address format
    5 Version: 1.0.0
     5Version: 1.0.1
    66Author: Weslink
    77Author URI: https://weslink.de
     
    9797    }
    9898
     99    wl_send_siteinfo('activate');
     100
    99101}
    100102register_activation_hook( __FILE__, 'wl_gfgaf_plugin_activation' );
    101103
     104/**
     105 * Action after deactivation of the plugin
     106 */
     107function wl_gfgaf_plugin_send_deactivation_homeping(){
     108
     109    wl_send_siteinfo('deactivate');
     110
     111}
     112register_deactivation_hook( __FILE__, 'wl_gfgaf_plugin_send_deactivation_homeping' );
    102113
    103114
     115/**
     116 * Action after uninstall of the plugin
     117 */
     118function wl_gfgaf_plugin_send_uninstall_homeping(){
     119
     120    wl_send_siteinfo('deactivate');
     121
     122}
     123register_uninstall_hook( __FILE__, 'wl_gfgaf_plugin_send_deactivation_homeping' );
     124
     125
     126/**
     127 * Sends create information of the plugin
     128 */
     129function wl_gfgaf_send_siteinfo($hook) {
     130
     131    global $wp_version;
     132
     133    $blog_url = home_url();
     134    $plugin_version = WL_ERECHT24_PLUGIN_VERSION;
     135    $plugin_name = WL_ERECHT24_PLUGIN_NAME;
     136
     137    if ($hook == 'deactivate') {
     138        $plugin_state = 'deactivated';
     139    } elseif ($hook == 'activate') {
     140        $plugin_state = 'activated';
     141    } elseif ($hook == 'uninstall') {
     142        $plugin_state = 'uninstalled';
     143    }
     144
     145    $url = 'https://license.weslink.de/reg.php';
     146
     147    $post_string = http_build_query(array(
     148            'url'               => $blog_url,
     149            'wpversion'         => $wp_version,
     150            'plugin_version'    => $plugin_version,
     151            'plugin_name'       => $plugin_name,
     152            'plugin_status'      =>  $plugin_state
     153        )
     154    );
     155
     156    $ch = curl_init();
     157
     158    curl_setopt($ch, CURLOPT_URL, $url );
     159    curl_setopt($ch, CURLOPT_POST, 1);
     160    curl_setopt($ch, CURLOPT_POSTFIELDS,    $post_string);
     161    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     162    $server_output = curl_exec ($ch);
     163
     164    curl_close($ch);
     165
     166}
     167
     168
     169
Note: See TracChangeset for help on using the changeset viewer.