Upload folder via GUI - integrations
This commit is contained in:
6
integrations/classes/class-api-request.php
Normal file
6
integrations/classes/class-api-request.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if(!defined('ABSPATH')) exit;
|
||||
class WMF_API_Request {
|
||||
public $url; public $arguments;
|
||||
public function __construct($url,$arguments){$this->url=$url;$this->arguments=$arguments;}
|
||||
}
|
||||
299
integrations/classes/class-integrations-page-controller.php
Normal file
299
integrations/classes/class-integrations-page-controller.php
Normal file
@@ -0,0 +1,299 @@
|
||||
<?php
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class WMF_Integrations_Page_Controller {
|
||||
|
||||
private static $instance = null;
|
||||
|
||||
public static function instance() {
|
||||
if(is_null(self::$instance)) self::$instance = new self();
|
||||
self::$instance->hook();
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
public function hook() {
|
||||
add_action('admin_menu', array($this, 'register_menu'));
|
||||
add_action('admin_post_wmf_save_global_settings', array($this, 'save_global_settings'));
|
||||
}
|
||||
|
||||
public function register_menu() {
|
||||
$hook = add_submenu_page(
|
||||
'wp-multi-formular',
|
||||
'Integrationen',
|
||||
'Integrationen',
|
||||
'manage_options',
|
||||
'wmf-integrations',
|
||||
array($this, 'page')
|
||||
);
|
||||
if($hook) {
|
||||
add_action('load-' . $hook, array($this, 'on_load'));
|
||||
}
|
||||
}
|
||||
|
||||
public function on_load() {
|
||||
// Metaboxen direkt hier registrieren (nicht ueber add_meta_boxes Hook)
|
||||
$this->register_metaboxes();
|
||||
wp_enqueue_script('postbox');
|
||||
wp_enqueue_style('wmf-int', WMF_URL . 'integrations/assets/css/admin.css', array(), WMF_VERSION);
|
||||
wp_enqueue_script('wmf-int', WMF_URL . 'integrations/assets/js/dashboard.js', array('jquery'), WMF_VERSION, true);
|
||||
wp_enqueue_style('wmf-admin', WMF_URL . 'assets/css/admin.css', array(), WMF_VERSION);
|
||||
}
|
||||
|
||||
private function register_metaboxes() {
|
||||
$screen = get_current_screen();
|
||||
if(!$screen) return;
|
||||
$sid = $screen->id;
|
||||
$int = wmf_get_integrations();
|
||||
|
||||
// Dienste nach Gruppe
|
||||
$groups = array(
|
||||
'email' => 'normal',
|
||||
'antispam' => 'side',
|
||||
'address' => 'side',
|
||||
'payments' => 'side',
|
||||
'automation' => 'column3',
|
||||
'analytics' => 'column4',
|
||||
);
|
||||
|
||||
foreach($groups as $group => $context) {
|
||||
$services = $int->get_service_group($group);
|
||||
foreach($services as $svc) {
|
||||
$id = 'wmf-int-widget-' . $svc->id;
|
||||
add_meta_box(
|
||||
$id,
|
||||
esc_html($svc->label),
|
||||
array($this, 'metabox_callback'),
|
||||
$sid,
|
||||
$context,
|
||||
'default',
|
||||
array('service' => $svc)
|
||||
);
|
||||
add_filter("postbox_classes_{$sid}_{$id}", function($classes) use($svc) {
|
||||
$classes[] = 'wmf-integrations-widget';
|
||||
$classes[] = 'wmf-integrations-widget-group-' . $svc->group;
|
||||
return $classes;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function metabox_callback($post, $metabox) {
|
||||
$metabox['args']['service']->admin_widget();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
SEITEN-AUSGABE
|
||||
------------------------------------------------------------------ */
|
||||
public function page() {
|
||||
// Test-Mail
|
||||
if(!empty($_GET['wmf_test_mail']) && wp_verify_nonce($_GET['_wpnonce'] ?? '', 'wmf_test_mail')) {
|
||||
$this->handle_test_mail();
|
||||
}
|
||||
$screen = get_current_screen();
|
||||
$sid = $screen ? $screen->id : '';
|
||||
require WMF_INT_DIR . 'templates/admin-integrations.php';
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
GLOBALE E-MAIL-EINSTELLUNGEN (als eigener Abschnitt, nicht als Meta-Box)
|
||||
------------------------------------------------------------------ */
|
||||
public function render_global_email_settings() {
|
||||
$opts = get_option('wmf_global_settings', array());
|
||||
$from_name = $opts['from_name'] ?? get_bloginfo('name');
|
||||
$from_email = $opts['from_email'] ?? get_option('admin_email');
|
||||
$smtp_on = $opts['smtp_enabled'] ?? '0';
|
||||
$smtp_host = $opts['smtp_host'] ?? '';
|
||||
$smtp_port = $opts['smtp_port'] ?? '587';
|
||||
$smtp_enc = $opts['smtp_enc'] ?? 'tls';
|
||||
$smtp_user = $opts['smtp_user'] ?? '';
|
||||
$smtp_pass = $opts['smtp_pass'] ?? '';
|
||||
?>
|
||||
<div class="wmf-global-settings-box">
|
||||
<h2 class="wmf-global-settings-title">
|
||||
<span class="dashicons dashicons-email-alt"></span>
|
||||
Globale E-Mail-Einstellungen
|
||||
</h2>
|
||||
|
||||
<form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>">
|
||||
<?php wp_nonce_field('wmf_global_settings_save', 'wmf_global_nonce'); ?>
|
||||
<input type="hidden" name="action" value="wmf_save_global_settings">
|
||||
|
||||
<div class="wmf-global-settings-grid">
|
||||
|
||||
<!-- Absender -->
|
||||
<div class="wmf-settings-section">
|
||||
<h3>Standard-Absender</h3>
|
||||
<p class="description">Gilt fuer alle Formulare. Im einzelnen Formular kann dies ueberschrieben werden.</p>
|
||||
|
||||
<div class="wmf-setting-row">
|
||||
<label for="wmf_from_name">Absendername</label>
|
||||
<input type="text" id="wmf_from_name" name="wmf_from_name"
|
||||
value="<?php echo esc_attr($from_name); ?>"
|
||||
class="regular-text" placeholder="<?php echo esc_attr(get_bloginfo('name')); ?>">
|
||||
</div>
|
||||
|
||||
<div class="wmf-setting-row">
|
||||
<label for="wmf_from_email">Absender-E-Mail</label>
|
||||
<input type="email" id="wmf_from_email" name="wmf_from_email"
|
||||
value="<?php echo esc_attr($from_email); ?>"
|
||||
class="regular-text" placeholder="noreply@ihredomain.de">
|
||||
<p class="description">
|
||||
Tipp: Nutzen Sie eine Adresse Ihrer Domain um Spam-Filter zu vermeiden.<br>
|
||||
z.B. <code>noreply@viper-network.de</code>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SMTP -->
|
||||
<div class="wmf-settings-section">
|
||||
<h3>SMTP <span style="font-weight:normal;font-size:13px;color:#646970;">(optional)</span></h3>
|
||||
<p class="description">Eigenen Mailserver verwenden statt WordPress-Standard (wp_mail).</p>
|
||||
|
||||
<div class="wmf-setting-row">
|
||||
<label class="wmf-toggle-label">
|
||||
<input type="checkbox" name="wmf_smtp_enabled" value="1" id="wmf_smtp_toggle" <?php checked($smtp_on,'1'); ?>>
|
||||
<span class="wmf-toggle-slider"></span>
|
||||
SMTP aktivieren
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="wmf-smtp-fields" style="<?php echo $smtp_on==='1'?'':'display:none;'; ?>">
|
||||
<div class="wmf-setting-row">
|
||||
<label for="wmf_smtp_host">SMTP-Host</label>
|
||||
<input type="text" id="wmf_smtp_host" name="wmf_smtp_host"
|
||||
value="<?php echo esc_attr($smtp_host); ?>"
|
||||
class="regular-text" placeholder="smtp.gmail.com">
|
||||
</div>
|
||||
<div class="wmf-setting-row wmf-setting-row-inline">
|
||||
<div>
|
||||
<label for="wmf_smtp_port">Port</label>
|
||||
<input type="number" id="wmf_smtp_port" name="wmf_smtp_port"
|
||||
value="<?php echo esc_attr($smtp_port); ?>"
|
||||
class="small-text">
|
||||
<span class="description">587=TLS 465=SSL 25=keins</span>
|
||||
</div>
|
||||
<div>
|
||||
<label for="wmf_smtp_enc">Verschluesselung</label>
|
||||
<select id="wmf_smtp_enc" name="wmf_smtp_enc">
|
||||
<option value="tls" <?php selected($smtp_enc,'tls'); ?>>TLS (empfohlen)</option>
|
||||
<option value="ssl" <?php selected($smtp_enc,'ssl'); ?>>SSL</option>
|
||||
<option value="" <?php selected($smtp_enc,''); ?>>Keine</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wmf-setting-row">
|
||||
<label for="wmf_smtp_user">Benutzername / E-Mail</label>
|
||||
<input type="text" id="wmf_smtp_user" name="wmf_smtp_user"
|
||||
value="<?php echo esc_attr($smtp_user); ?>"
|
||||
class="regular-text" autocomplete="off">
|
||||
</div>
|
||||
<div class="wmf-setting-row">
|
||||
<label for="wmf_smtp_pass">Passwort</label>
|
||||
<input type="password" id="wmf_smtp_pass" name="wmf_smtp_pass"
|
||||
value="<?php echo esc_attr($smtp_pass); ?>"
|
||||
class="regular-text" autocomplete="new-password">
|
||||
<p class="description">Bei Gmail: App-Passwort verwenden (kein normales Konto-Passwort).</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- .wmf-global-settings-grid -->
|
||||
|
||||
<div class="wmf-global-settings-footer">
|
||||
<button type="submit" class="button button-primary button-large">
|
||||
Einstellungen speichern
|
||||
</button>
|
||||
<?php if(!empty($from_email)): ?>
|
||||
<a href="<?php echo esc_url(wp_nonce_url(
|
||||
add_query_arg(array('wmf_test_mail'=>'1','page'=>'wmf-integrations'), admin_url('admin.php')),
|
||||
'wmf_test_mail'
|
||||
)); ?>" class="button button-secondary button-large">
|
||||
✉ Test-Mail an <?php echo esc_html(get_option('admin_email')); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<span class="wmf-smtp-status <?php echo ($smtp_on==='1'&&!empty($smtp_host))?'active':''; ?>">
|
||||
<?php echo ($smtp_on==='1'&&!empty($smtp_host)) ? '✓ SMTP aktiv' : 'SMTP nicht aktiv'; ?>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($){
|
||||
$('#wmf_smtp_toggle').on('change', function(){
|
||||
$('#wmf-smtp-fields').toggle(this.checked);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.wmf-global-settings-box{background:#fff;border:1px solid #dcdcde;border-radius:4px;margin-bottom:20px;overflow:hidden;}
|
||||
.wmf-global-settings-title{display:flex;align-items:center;gap:8px;margin:0;padding:14px 20px;background:#f6f7f7;border-bottom:1px solid #dcdcde;font-size:15px;}
|
||||
.wmf-global-settings-title .dashicons{color:#2271b1;font-size:20px;width:20px;height:20px;}
|
||||
.wmf-global-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid #dcdcde;}
|
||||
.wmf-settings-section{padding:20px 24px;border-right:1px solid #dcdcde;}
|
||||
.wmf-settings-section:last-child{border-right:none;}
|
||||
.wmf-settings-section h3{margin:0 0 4px;font-size:13px;}
|
||||
.wmf-setting-row{margin-bottom:14px;}
|
||||
.wmf-setting-row label{display:block;font-weight:600;font-size:13px;margin-bottom:5px;}
|
||||
.wmf-setting-row .regular-text{width:100%;max-width:360px;box-sizing:border-box;}
|
||||
.wmf-setting-row .description{font-size:12px;color:#646970;margin-top:4px;}
|
||||
.wmf-setting-row-inline{display:flex;gap:20px;flex-wrap:wrap;}
|
||||
.wmf-toggle-label{display:flex!important;align-items:center;gap:10px;cursor:pointer;font-weight:normal!important;}
|
||||
.wmf-global-settings-footer{display:flex;align-items:center;gap:12px;padding:16px 24px;background:#f6f7f7;flex-wrap:wrap;}
|
||||
.wmf-smtp-status{font-size:12px;color:#646970;margin-left:auto;}
|
||||
.wmf-smtp-status.active{color:#46b450;font-weight:600;}
|
||||
@media(max-width:900px){.wmf-global-settings-grid{grid-template-columns:1fr;}.wmf-settings-section{border-right:none;border-bottom:1px solid #dcdcde;}}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
GLOBALE EINSTELLUNGEN SPEICHERN
|
||||
------------------------------------------------------------------ */
|
||||
public function save_global_settings() {
|
||||
if(!wp_verify_nonce($_POST['wmf_global_nonce'] ?? '', 'wmf_global_settings_save') || !current_user_can('manage_options')) {
|
||||
wp_die('Sicherheitsfehler.');
|
||||
}
|
||||
update_option('wmf_global_settings', array(
|
||||
'from_name' => sanitize_text_field($_POST['wmf_from_name'] ?? ''),
|
||||
'from_email' => sanitize_email( $_POST['wmf_from_email'] ?? ''),
|
||||
'smtp_enabled' => !empty($_POST['wmf_smtp_enabled']) ? '1' : '0',
|
||||
'smtp_host' => sanitize_text_field($_POST['wmf_smtp_host'] ?? ''),
|
||||
'smtp_port' => intval( $_POST['wmf_smtp_port'] ?? 587),
|
||||
'smtp_enc' => sanitize_text_field($_POST['wmf_smtp_enc'] ?? 'tls'),
|
||||
'smtp_user' => sanitize_text_field($_POST['wmf_smtp_user'] ?? ''),
|
||||
'smtp_pass' => $_POST['wmf_smtp_pass'] ?? '',
|
||||
));
|
||||
wmf_safe_redirect(add_query_arg(array('page'=>'wmf-integrations','wmf_notice'=>'global_saved'), admin_url('admin.php')));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
TEST-MAIL
|
||||
------------------------------------------------------------------ */
|
||||
private function handle_test_mail() {
|
||||
$opts = get_option('wmf_global_settings', array());
|
||||
$from_name = $opts['from_name'] ?? get_bloginfo('name');
|
||||
$from_mail = $opts['from_email'] ?? get_option('admin_email');
|
||||
$to = get_option('admin_email');
|
||||
$headers = array('Content-Type: text/html; charset=UTF-8', 'From: '.$from_name.' <'.$from_mail.'>');
|
||||
$body = '<html><body style="font-family:sans-serif;padding:20px;">
|
||||
<h2 style="color:#2271b1;">WP Multi Formular – Test-E-Mail</h2>
|
||||
<p>Diese Test-E-Mail wurde erfolgreich gesendet.</p>
|
||||
<table style="border-collapse:collapse;margin-top:16px;">
|
||||
<tr><td style="padding:6px 12px;background:#f6f7f7;font-weight:600;">Von:</td><td style="padding:6px 12px;">' . esc_html($from_name) . ' <' . esc_html($from_mail) . '></td></tr>
|
||||
<tr><td style="padding:6px 12px;background:#f6f7f7;font-weight:600;">An:</td><td style="padding:6px 12px;">' . esc_html($to) . '</td></tr>
|
||||
<tr><td style="padding:6px 12px;background:#f6f7f7;font-weight:600;">Datum:</td><td style="padding:6px 12px;">' . current_time('d.m.Y H:i') . '</td></tr>
|
||||
</table>
|
||||
</body></html>';
|
||||
$sent = wp_mail($to, 'Test-E-Mail – WP Multi Formular', $body, $headers);
|
||||
$msg = $sent
|
||||
? '<div class="notice notice-success is-dismissible"><p>✓ Test-E-Mail gesendet an <strong>' . esc_html($to) . '</strong>.</p></div>'
|
||||
: '<div class="notice notice-error is-dismissible"><p>✗ Fehler beim Senden. Bitte SMTP-Einstellungen pruefen.</p></div>';
|
||||
add_action('admin_notices', function() use($msg){ echo $msg; });
|
||||
}
|
||||
}
|
||||
|
||||
function wmf_get_integrations_page_controller() {
|
||||
return WMF_Integrations_Page_Controller::instance();
|
||||
}
|
||||
113
integrations/classes/class-integrations.php
Normal file
113
integrations/classes/class-integrations.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class WMF_Integrations {
|
||||
private static $instance=null;
|
||||
private static $hooked=false;
|
||||
private $option_name='_wmf_service_credentials';
|
||||
private $services=array();
|
||||
private $grouped_services=array();
|
||||
private $credentials=array();
|
||||
private $notice=array();
|
||||
public $action_update='wmf-service-update';
|
||||
public $integrations_action='wmf-integrations-update';
|
||||
|
||||
public static function instance() {
|
||||
if(is_null(self::$instance)) self::$instance=new self();
|
||||
return self::$instance;
|
||||
}
|
||||
private function __construct() {
|
||||
$b=WMF_INT_DIR;
|
||||
$services=array(
|
||||
'recaptcha/class-service-recaptcha.php' =>'WMF_Service_Recaptcha',
|
||||
'recaptchav3/class-service-recaptchav3.php' =>'WMF_Service_RecaptchaV3',
|
||||
'mailchimp/class-service-mailchimp.php' =>'WMF_Service_Mailchimp',
|
||||
'mailerlite/class-service-mailerlite.php' =>'WMF_Service_MailerLite',
|
||||
'active-campaign/class-service-active-campaign.php'=>'WMF_Service_ActiveCampaign',
|
||||
'convertkit/class-service-convertkit.php' =>'WMF_Service_ConvertKit',
|
||||
'stripe/class-service-stripe.php' =>'WMF_Service_Stripe',
|
||||
'paypal/class-service-paypal.php' =>'WMF_Service_PayPal',
|
||||
'zapier/class-service-zapier.php' =>'WMF_Service_Zapier',
|
||||
'google-analytics/class-service-google-analytics.php'=>'WMF_Service_Google_Analytics',
|
||||
'google-places/class-service-google-places.php' =>'WMF_Service_Google_Places',
|
||||
);
|
||||
foreach($services as $file=>$cls) {
|
||||
require_once $b.'services/'.$file;
|
||||
$this->register_service($cls);
|
||||
}
|
||||
}
|
||||
public function hook() {
|
||||
if(self::$hooked) return; self::$hooked=true;
|
||||
add_action('wp_ajax_'.$this->action_update, array($this,'ajax_service_update'));
|
||||
add_action('wp_ajax_'.$this->integrations_action,array($this,'ajax_integrations_update'));
|
||||
add_action('wmf_integrations_print_notices', array($this,'print_notices'));
|
||||
$this->read_credentials();
|
||||
$this->configure_services();
|
||||
}
|
||||
public function register_service($cls) {
|
||||
$s=$cls instanceof WMF_Service?$cls:new $cls();
|
||||
$this->services[$s->id]=$s;
|
||||
}
|
||||
public function configure_services() {
|
||||
foreach($this->services as $s) {
|
||||
$s->set_credentials($this->credentials[$s->id]??array());
|
||||
$s->configure(); $s->load();
|
||||
}
|
||||
}
|
||||
public function read_credentials(){$this->credentials=get_option($this->option_name,array());}
|
||||
public function write_credentials(){
|
||||
$this->credentials=array_map(fn($s)=>$s->get_credentials(),$this->services);
|
||||
update_option($this->option_name,$this->credentials);
|
||||
}
|
||||
public function get_services(){return $this->services;}
|
||||
public function get_service($id){return $this->services[$id]??false;}
|
||||
public function get_service_group($group){
|
||||
// Neu aufbauen falls noch nicht geschehen oder leer
|
||||
if(empty($this->grouped_services)) {
|
||||
$this->grouped_services = array();
|
||||
foreach($this->services as $s) {
|
||||
$this->grouped_services[$s->group][] = $s;
|
||||
}
|
||||
}
|
||||
return $this->grouped_services[$group] ?? array();
|
||||
}
|
||||
|
||||
public function reset_grouped_cache() {
|
||||
$this->grouped_services = array();
|
||||
}
|
||||
public function ajax_service_update() {
|
||||
if(!check_ajax_referer($this->action_update)||!current_user_can('manage_options')) wp_die();
|
||||
$services=(array)($_REQUEST['services']??array());
|
||||
$group=sanitize_text_field($_REQUEST['group']??'');
|
||||
ob_start();
|
||||
foreach($services as $sid) {
|
||||
if(!isset($this->services[$sid])) continue;
|
||||
$svc=$this->services[$sid];
|
||||
$def=$svc->get_credentials();
|
||||
$raw=$_REQUEST['credentials'][$sid]??array();
|
||||
$creds=array_map('sanitize_text_field',array_intersect_key(wp_parse_args($raw,$def),$def));
|
||||
$svc->set_credentials($creds,$raw);
|
||||
$this->write_credentials();
|
||||
}
|
||||
$this->notice=array('status'=>'success','message'=>'Änderungen gespeichert.');
|
||||
if($group==='antispam') require WMF_INT_DIR.'templates/admin-antispam-integrations.php';
|
||||
echo ob_get_clean(); die();
|
||||
}
|
||||
public function ajax_integrations_update() {
|
||||
if(!check_ajax_referer($this->integrations_action)||!current_user_can('manage_options')) wp_die();
|
||||
if(!isset($_REQUEST['service'],$_REQUEST['credentials'])) wp_die();
|
||||
$sid=sanitize_text_field($_REQUEST['service']);
|
||||
if(!isset($this->services[$sid])) wp_send_json_error();
|
||||
$svc=$this->services[$sid]; $def=$svc->get_credentials();
|
||||
$raw=$_REQUEST['credentials'][$sid]??array();
|
||||
$creds=array_map('sanitize_text_field',array_intersect_key(wp_parse_args($raw,$def),$def));
|
||||
$prev=$svc->get_credentials(); $svc->set_credentials($creds,$raw); $this->write_credentials();
|
||||
$this->notice=array('status'=>'success','message'=>'Änderungen gespeichert.');
|
||||
ob_start(); $svc->admin_widget($prev); echo ob_get_clean(); die();
|
||||
}
|
||||
public function print_notices() {
|
||||
if(empty($this->notice)) return;
|
||||
printf('<div class="notice notice-%s"><p>%s</p></div>',esc_attr($this->notice['status']),esc_html($this->notice['message']));
|
||||
}
|
||||
}
|
||||
function wmf_get_integrations(){return WMF_Integrations::instance();}
|
||||
17
integrations/classes/class-service.php
Normal file
17
integrations/classes/class-service.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if(!defined('ABSPATH')) exit;
|
||||
class WMF_Service {
|
||||
protected $credentials=array();
|
||||
public $id=''; public $label=''; public $group='';
|
||||
public function set_credentials($creds=array(),$raw=array()){$this->credentials=$creds;}
|
||||
public function get_credentials(){return $this->credentials;}
|
||||
public function is_connected(){return false;}
|
||||
public function admin_widget($prev=array()){}
|
||||
public function configure(){}
|
||||
public function load(){}
|
||||
public function make_api_request($url,$args){
|
||||
$req=new WMF_API_Request($url,$args);
|
||||
$req=apply_filters('wmf_api_request',$req,$this);
|
||||
return wp_remote_request($req->url,$req->arguments);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user