示例#1
0
 function create_field($field)
 {
     // defaults?
     $field = array_merge($this->defaults, $field);
     // update modules
     modules_to_json();
     // include the custom modules dropzone
     echo '<div class="custom-modules-upload">';
     // upload form
     echo '<div id="custom-modules-upload" data-upload-url="' . get_stylesheet_directory_uri() . '/content-editor/modules_upload.php"></div>';
     // close semplice div
     echo '</div>';
     // installed modules
     echo '<div class="installed-modules">';
     // list modules
     echo list_modules(false, false, false, false);
     echo '</div>';
 }
示例#2
0
            // check if it's a semplice module
            if ($comment === 'semplicelabs') {
                // extract zip
                $zip->extractTo($modules_target_dir);
            }
            // close zip
            $zip->close();
        } else {
            echo 'Module installation failed!';
        }
        // delete zip
        unlink($module_zip);
    } else {
        echo "Please upload a valid module zip file!";
    }
}
if ($mode === 'reload') {
    // update modules
    modules_to_json();
    // list modules
    echo list_modules(false, false, false, false);
} elseif ($mode === 'deactivate') {
    // active toggle module
    module_status($module_id, $module_status);
    // update modules
    modules_to_json();
    // list modules
    echo list_modules(false, false, false, false);
}
?>