X7ROOT File Manager
Current Path:
/home/katmhsmi/public_html/wp-content/plugins/xagio/models
home
/
katmhsmi
/
public_html
/
wp-content
/
plugins
/
xagio
/
models
/
📁
..
📄
.htaccess
(420 B)
📄
wp_affiliate.php
(14.41 KB)
📄
wp_api.php
(131.08 KB)
📄
wp_batches.php
(3.67 KB)
📄
wp_bulk_image_converter.php
(2.25 KB)
📄
wp_captcha.php
(2.33 KB)
📄
wp_captcha_comment.php
(1.8 KB)
📄
wp_captcha_login.php
(976 B)
📄
wp_captcha_register.php
(819 B)
📄
wp_clone.php
(21.76 KB)
📄
wp_comments.php
(1.26 KB)
📄
wp_default.php
(6.98 KB)
📄
wp_exif.php
(11.1 KB)
📄
wp_extend_widgets.php
(4.21 KB)
📄
wp_freshstart.php
(16.03 KB)
📄
wp_groups.php
(30.02 KB)
📄
wp_keywords.php
(52.68 KB)
📄
wp_log404.php
(19.68 KB)
📄
wp_migration.php
(16.26 KB)
📄
wp_redirects.php
(5.16 KB)
📄
wp_rescue.php
(17.66 KB)
📄
wp_review.php
(3.2 KB)
📄
wp_reviewr.php
(3.76 KB)
📄
wp_reviews.php
(16.82 KB)
📄
wp_schema.php
(16.12 KB)
📄
wp_seo.php
(79.76 KB)
📄
wp_settings.php
(32.76 KB)
📄
wp_sync.php
(1.74 KB)
📄
wp_tinymce_buttons.php
(6.23 KB)
📄
wp_troubleshooting.php
(2.91 KB)
📄
wp_update.php
(7.9 KB)
Editing: wp_batches.php
<?php if (!class_exists('MXAG_Batches')) { class MXAG_Batches extends MXAG_Model { public static function initialize () { add_filter('cron_schedules', ['MXAG_Batches', 'customSchedules']); add_action('xag_checkKeywordBatches', array('MXAG_Batches', 'checkKeywordBatches')); if (! wp_next_scheduled ( 'xag_checkKeywordBatches' )) { wp_schedule_event(time(), 'minute', 'xag_checkKeywordBatches'); } add_action('admin_post_xag_checkBatchCron', ['MXAG_Batches', 'checkKeywordBatches']); } public static function customSchedules ($schedules) { if (!isset($schedules["minute"])) { $schedules["minute"] = [ 'interval' => 60, 'display' => __('Once every minute') ]; } return $schedules; } public static function checkKeywordBatches () { $batches = self::getAllData(); if (sizeof($batches) == 0) { XAG_Init::json('done', 'No more batches.'); } $change = FALSE; foreach ($batches as $batch) { $http_code = 0; $result = MXAG_Api::apiRequest( $endpoint = 'keywords', $method = 'GET', [ 'batch_id' => $batch['batch_id'], ], $http_code ); // Check the status if ($http_code == 200) { $change = TRUE; // They're all completed foreach ($result as $keyword) { MXAG_Keywords::updateData([ 'broad' => $keyword['broad'], 'phrase' => $keyword['phrase'], 'intitle' => $keyword['title'], 'inurl' => $keyword['url'], 'queued' => 0, ], [ 'id' => $keyword['real_id'] ]); } // Remove the batch self::removeData([ 'id' => $batch['id'], ]); } else if ($http_code == 500) { self::removeData([ 'id' => $batch['id'] ]); } } if ($change == TRUE) { XAG_Init::json('change', 'Batch finished.'); } else { XAG_Init::json('pending', 'Batch still running.'); } } protected static $TABLE_NAME; public function __construct () { static::$TABLE_NAME = self::TABLE_NAME; } // MySQL const TABLE_NAME = 'prs_batches'; public static function createTable () { global $wpdb; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); $charset_collate = $wpdb->get_charset_collate(); $creation_query = 'CREATE TABLE ' . self::TABLE_NAME . ' ( `id` int(11) NOT NULL AUTO_INCREMENT, `batch_id` int(11), `status` varchar(255) default "pending", `date_created` datetime, PRIMARY KEY (`id`) ) ' . $charset_collate . ';'; @dbDelta($creation_query); } public static function removeTable () { global $wpdb; $query = 'DROP TABLE IF EXISTS ' . self::TABLE_NAME . ';'; $wpdb->query($query); } } }
Upload File
Create Folder