| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/cwd/wp-content/plugins/cornerstone/includes/integration/Max/ |
Upload File : |
<?php
/**
* Admin Max extensions rows
*/
add_action("cs_max_output_admin_extensions", function() {
// Disabled
if(!apply_filters('cs_max_enabled', true)) {
return;
}
include(__DIR__ . "/views/page-home-box-max.php");
});
// Add Max site imports to the Sites section
// of the themeco section
// This is only setup setup for personify
add_filter('cs_app_remote_assets', function($cached) {
$courses = cs_max_get_courses();
// Loop courses
foreach ($courses['data'] as $courseData) {
// Not purchased
if (empty($courseData['purchased'])) {
continue;
}
// Loop course items
foreach ($courseData['course'] as $course) {
// Not a site import
if ($course['tcoFileType'] !== 'site') {
continue;
}
$sanitized = sanitize_title($course['title']);
$cached['templates']['sites'][] = [
'id' => $course['tcoFile'],
'title' => $course['title'],
'type' => 'site',
'preview' => 'https://theme.co/app/uploads/personify/tiles/' . $sanitized . '.png',
'demo_url' => 'https://theme.co/personify/' . $sanitized,
'isRemote' => true,
];
}
}
return $cached;
});