<?php
/**
 * Open Source Social Network
 *
 * @package Open Source Social Network
 * @author    OSSN Core Team https://www.openteknik.com/contact
 * @copyright (C) OpenTeknik LLC
 * @license   OPENTEKNIK  LLC, COMMERCIAL LICENSE, COMMERCIAL LICENSE https://www.openteknik.com/license/commercial-license-v1
 * @link      https://www.opensource-socialnetwork.org/
 */

error_log("WorldsPage Component Loaded"); // Check your PHP error log

define('WPAGE', ossn_route()->com . 'WorldsPage/');

    require_once(WPAGE . 'classes/Page.php');
    require_once(WPAGE . 'classes/Cover.php');
    require_once(WPAGE . 'classes/Photo.php');
    require_once(WPAGE . 'classes/Like.php');
    
    
     if (ossn_isLoggedin()) {
        ossn_register_site_settings_page('wpage', 'settings/admin/wpages');
        ossn_register_admin_sidemenu('admin:wpage', 'admin:wpage', ossn_site_url('administrator/settings/wpage?mpage=list'), ossn_print('admin:sidemenu:settings'));

        if (ossn_isAdminLoggedin()) {
            ossn_register_action('wpage/add', WPAGE . 'actions/add.php');
            ossn_register_action('wpage/edit', WPAGE . 'actions/edit.php');
            ossn_register_action('wpage/delete', WPAGE . 'actions/delete.php');
            ossn_register_action('wpage/cover/add', WPAGE . 'actions/cover/add.php');
            ossn_register_action('wpage/cover/save', WPAGE . 'actions/cover/save.php');
        }

 }

ossn_register_system_sdk('WorldsPage', 'worlds_pages_init_20');