Plugin Directory

Changeset 2002896


Ignore:
Timestamp:
12/28/2018 01:47:59 PM (7 years ago)
Author:
fullmoonfriday
Message:

first update with api test

Location:
wps-complete
Files:
14 added
7 edited

Legend:

Unmodified
Added
Removed
  • wps-complete/trunk/README.txt

    r1980235 r2002896  
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Wordpress Support Complete brings the tools you are looking for to help maintain and develop your site.
     10Wordpress Support Complete brings the tools you are looking for to help maintain and develop your site. Site Backups, Development Tools, Backend Menus
    1111
    1212== Description ==
    1313
    14 This plugin is required for using any of our additional plugins. It is the central hub and provides any otherwsie dificult to get information about your website.
     14This plugin is required for using any of our plugin suite.
     15It is the central hub for the extensions available, including an API to hook upto our cloud services.
     16More infomation to setup the API can be found <a href="https://wpscomplete.com/wps-complete-api/" target="_blank" >HERE</a>. 
     17All our plugins can be seen <a href="https://wpscomplete.com/plugins/" target="_blank" >HERE</a>.
    1518
    1619
     
    3538
    3639
     40== Changelog ==
    3741
    38 == Changelog ==
     42= 0.8 =
     431.Added V1 REST API to connect to our cloud services at WPScomplete.com
    3944
    4045= 0.7.2 =
  • wps-complete/trunk/includes/class_wps_file_util.php

    r1980021 r2002896  
    1414    }
    1515
     16
     17
     18
     19    /*
     20     * php delete function that deals with directories recursively
     21     */
     22    static function delete_files($dirname) {
     23        if (is_dir($dirname)){
     24            $dir_handle = opendir($dirname);
     25                if (!$dir_handle){
     26                    return false;
     27                }
     28                while($file = readdir($dir_handle)) {
     29                    if ($file != "." && $file != "..") {
     30                        if (!is_dir($dirname."/".$file))
     31                            unlink($dirname."/".$file);
     32                        else
     33                            delete_directory($dirname.'/'.$file);
     34                    }
     35                }
     36            closedir($dir_handle);
     37            rmdir($dirname);
     38            return true;
     39        }
     40    }
     41
     42
    1643}
  • wps-complete/trunk/includes/css/WPS_admin_styles.css

    r1957770 r2002896  
     1#adminmenuback{
     2    /*display:none;*/
     3}
     4
     5
     6
     7
     8
    19td {
    210    border-bottom: 1px #cbc9c9 solid;
  • wps-complete/trunk/includes/wp_support_tab.php

    r1976448 r2002896  
    22<?php $user = wp_get_current_user(); ?>
    33
    4 <h4>Hello <?php echo $user->first_name ." ". $user->last_name; ?></h4>
     4<h4>Hello <?php echo $user->user_nicename; ?></h4>
    55
    66<div class="admin_text">
    7     <p>Welcome to the first version of WordPress Support Complete plugin</p>
    8     <p>WPS complete is an initiative to get you the best support for all areas of Wordpress. Minor bug fixes, design, updates, maintenance, and complete plugin development can be sourced direct through your wordpress backend. Please get in touch at <a href="https://wpscomplete.com/" >WPScomplete.com</a> for additional feature requests.</p>
     7    <p>We have added version 1 of our API so you can connect to WPScomplete.com for cloud backups of your website when using the <a href="https://wordpress.org/plugins/wps-backup/" target="_blank" >WPS Backup plugin</a>.</p>
     8    <p>A few more Dev Tools have also been added for more information easily available.</p>
     9    <p>Please get in touch at <a href="https://wpscomplete.com/" >WPScomplete.com</a> for additional feature requests.</p>
    910</div>
    1011
  • wps-complete/trunk/includes/wpsc_admin_notices.php

    r1980021 r2002896  
    6868    }
    6969
    70 
     70    //api
     71    switch( $message ){
     72        case 'new_api' :
     73                $text = __( 'A new API key was generated.', 'wps' );
     74                $class = 'notice notice-success is-dismissible';
     75            break;
     76        case 'error_no_api' :
     77                $text = __( 'A new API key was generated.', 'wps' );
     78                $class = 'notice notice-success is-dismissible';
     79            break;
     80    }
    7181
    7282
  • wps-complete/trunk/wps_complete.php

    r1980237 r2002896  
    66Description: Default plugin required to support our plugin suite available at <a target="_blank" href="https://wpscomplete.com/plugins/">WPS Complete</a>
    77Author: WPScomplete.com
    8 Version: 0.7.3
     8Version: 0.8
    99Author URI: https://wpscomplete.com
    1010*/
    1111
    1212
    13 
     13ini_set('display_startup_errors', 1);
     14ini_set('display_errors', 1);
     15error_reporting(-1);
    1416
    1517if ( !defined( 'WPS_PLUGIN_DIR' ) ) {
     
    3638
    3739require( WPS_PLUGIN_DIR . 'includes/class_wps_file_util.php' );
     40require( WPS_PLUGIN_DIR . 'includes/class_wps_api.php' );
     41require( WPS_PLUGIN_DIR . 'includes/api/wpsc_api_functions.php' );
     42require( WPS_PLUGIN_DIR . 'includes/wpsc_setup_scripts.php' );
     43require( WPS_PLUGIN_DIR . 'includes/wpsc_template_wp_support.php' );
     44require( WPS_PLUGIN_DIR . 'includes/wpsc_admin_notices.php' );
     45require( WPS_PLUGIN_DIR . 'includes/admin/wpsc_function_actions.php' );
    3846
    39 require( WPS_PLUGIN_DIR . 'includes/wps_setup_scripts.php' );
    40 require( WPS_PLUGIN_DIR . 'includes/wps_template_wp_support.php' );
    41 require( WPS_PLUGIN_DIR . 'includes/wpsc_admin_notices.php' );
    4247
    43 require( WPS_PLUGIN_DIR . 'includes/admin/wpsc_function_actions.php' );
     48global $WPS_api_db_version;
     49$WPS_api_db_version = '1.2';
     50
     51function WPS_api_database() {
     52    global $wpdb;
     53    global $WPS_api_db_version;
     54
     55    if ( $WPS_api_db_version != get_option('WPS_api_db_version' ) ){
     56        update_option( 'lt_dd_subscriptions_version', $WPS_api_db_version );
     57    }
     58
     59    $table_name = $wpdb->prefix . 'WPS_api_keys';
     60    $charset_collate = $wpdb->get_charset_collate();
     61
     62    $sql = "CREATE TABLE $table_name (
     63                `key_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
     64                `user_id` bigint(20) unsigned NOT NULL,
     65                `description` varchar(200) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
     66                `permissions` varchar(10) COLLATE utf8mb4_unicode_520_ci NOT NULL,
     67                `consumer_key` char(64) COLLATE utf8mb4_unicode_520_ci NOT NULL,
     68                `consumer_secret` char(43) COLLATE utf8mb4_unicode_520_ci NOT NULL,
     69                `nonces` longtext COLLATE utf8mb4_unicode_520_ci,
     70                `truncated_key` char(7) COLLATE utf8mb4_unicode_520_ci NOT NULL,
     71                `last_access` datetime DEFAULT NULL,
     72                PRIMARY KEY (`key_id`),
     73                KEY `consumer_key` (`consumer_key`),
     74                KEY `consumer_secret` (`consumer_secret`)
     75        ) $charset_collate;";
     76
     77
     78
     79    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     80    @dbDelta( $sql );
     81    add_option( 'WPS_api_db_version', $WPS_api_db_version );
     82}
     83
     84register_activation_hook( __FILE__, 'WPS_api_database' );
     85
     86
     87// deactivations
     88
     89
     90// register_deactivation_hook(__FILE__, 'my_deactivation');
     91
     92// function my_deactivation() {
     93//     wp_clear_scheduled_hook('my_hourly_event');
     94// }
    4495
    4596
    4697
    4798
    48 
    49 
    50 
Note: See TracChangeset for help on using the changeset viewer.