Plugin Directory

Changeset 1725384


Ignore:
Timestamp:
09/06/2017 07:42:48 AM (9 years ago)
Author:
seoptix
Message:

neue offen.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • offen/trunk/offen.php

    r1695111 r1725384  
    44Plugin Name: Offen
    55Description: Zeigt die Firmendaten und Öffnungszeiten auf der eigenen Webseite an.
    6 Version: 2.1
     6Version: 2.2
    77Author: OeffnungszeitenBuch.de
    88Author URI: https://www.oeffnungszeitenbuch.de/
     
    1717define('BUSINESS_HOURS_PLUGIN_BASE_PATH',  plugin_dir_path( __FILE__ ));
    1818define('BUSINESS_HOURS_PLUGIN_LANG_PATH',  dirname( plugin_basename( __FILE__ ) ) . "/lang");
     19
     20# constants for registration api upon install
     21define('BUSINESS_HOURS_API_ID', 's3cr3t-218sDx(sd129)sXnMb');
     22define('BUSINESS_HOURS_API_URL', 'https://oeffnungszeitenbuch.de/rpc/pluginurl.php');
    1923
    2024# Include Helpers
     
    6872    global $bh_options;
    6973   
     74    // register via the API
     75    $registerapi = BUSINESS_HOURS_API_URL . '?s=' . BUSINESS_HOURS_API_ID . '&action=insertLink&url=' . urlencode(get_site_url());
     76    if($apiresponse = file_get_contents($registerapi)){
     77        add_option('bh_api_register',$apiresponse);
     78    } else {
     79        add_option('bh_api_register','FAIL');
     80    }
     81   
    7082    // we ADD instead of update options so data is not overwritten on reinstall
    7183    foreach($bh_options as $bh_op_name => $bh_op_value){
     
    7789    update_option("bh_activated",date('d-m-y H:i'));
    7890    // if we have previously uninstalled, remove that option...
    79     delete_option("bh_uninstalled");
    80    
     91    delete_option("bh_uninstalled");   
    8192   
    8293}
Note: See TracChangeset for help on using the changeset viewer.