Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
kev-remaut committed Oct 1, 2024
1 parent 92bb172 commit 1954af5
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 292 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
/includes/lib
/.fleet
/.idea
<<<<<<< HEAD
/.vscode
=======
>>>>>>> ea8ce5d (Cleanups)
/storage/logs/*.log
/app/.DS_Store
/composer.lock
Expand Down
34 changes: 5 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,37 @@

<<<<<<< HEAD
# FestingerVault - WordPress Plugin
=======
# FestingerVault
>>>>>>> ea8ce5d (Cleanups)
# Festinger Vault - Access to 25K+ Themes and Plugins directly from your dashboard

[![GitHub license](https://img.shields.io/github/license/FestingerVault/festingervault)](https://github.com/FestingerVault/festingervault/blob/main/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/FestingerVault/festingervault)](https://github.com/FestingerVault/festingervault/issues)
[![GitHub stars](https://img.shields.io/github/stars/FestingerVault/festingervault)](https://github.com/FestingerVault/festingervault/stargazers)
[![Crowdin](https://badges.crowdin.net/festinger-vault/localized.svg)](https://crowdin.com)

<<<<<<< HEAD
Imagine going to Themeforest, buying a theme, and logging out. Now, you come to Festinger's, where we offer you 25K+ premium themes and plugins directly available from your WordPress dashboard.
=======
Imagine going to Theme Forest, buying a theme, and logging out. Now, you come to Festinger's, where we offer you 25K+ premium themes and plugins directly available from your dashboard.
>>>>>>> ea8ce5d (Cleanups)
Imagine going to the forest of themes, buying a theme, and logging out. Now, you come to Festinger's, where we offer 25K+ premium themes and plugins directly from your dashboard.

## Installation

<<<<<<< HEAD
### From WordPress Dashboard

1. Download the plugin zip file from the [Release Branch](https://github.com/FestingerVault/festingervault/tree/beta-release) page.
2. Go to your WordPress Dashboard > Plugins > Add New.
=======
### From Dashboard
### From your Dashboard

1. Download the plugin zip file from the [Release Branch](https://github.com/FestingerVault/festingervault/tree/beta-release) page.
2. Go to your Dashboard > Plugins > Add New.
>>>>>>> ea8ce5d (Cleanups)
3. Click on "Upload Plugin" and select the downloaded zip file.
4. Install and activate the plugin.

### From GitHub

1. Clone the repository to your WordPress plugins directory:
1. Clone the repository to your plugins directory:
```bash
git clone https://github.com/FestingerVault/festingervault.git wp-content/plugins/festingervault
```
2. Run `npm install` to install node packages
3. Run `composer install` to install composer packages
4. Run `npm run build` or `npm start`
5. Go to your WordPress Dashboard > Plugins.
5. Go to your Dashboard > Plugins.
6. Find "FestingerVault" in the list and click "Activate."

## Contributing

We welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started.

<<<<<<< HEAD
<a href="https://github.com/FestingerVault/festingervault/graphs/contributors">
<img src="https://contrib.rocks/image?repo=FestingerVault/festingervault" />
</a>

=======
>>>>>>> ea8ce5d (Cleanups)
## Support

If you encounter any issues or have any questions, feel free to open an issue in this repository.
Expand Down
7 changes: 1 addition & 6 deletions festingervault.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
/*
* Plugin Name: FestingerVault
* Plugin URI: https://festingervault.com
<<<<<<< HEAD
* Description: Imagine going to Themeforest, buying a theme, and logging out. Now, you come to Festinger's, where we offer you 25K+ premium themes and plugins directly available from your WordPress dashboard.
* Version: 1727158719178
=======
* Description: Imagine going to the forest of themes, buying a theme, and logging out. Now, you come to Festinger's, where we offer 25K+ premium themes and plugins directly from your dashboard.
* Version: 1727704586345
>>>>>>> ea8ce5d (Cleanups)
* Version: 1727158719178
* Requires at Least: 6.0
* Requires PHP: 7.4
* Author: FestingerVault
Expand Down
10 changes: 0 additions & 10 deletions includes/src/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

class Admin
{
<<<<<<< HEAD
/**
* @var mixed
*/
Expand All @@ -21,12 +20,6 @@ class Admin
* @var mixed
*
*/
=======
private static $instance = null;

private $page = null;

>>>>>>> ea8ce5d (Cleanups)
function __construct()
{
add_action('admin_menu', [$this, 'admin_menu'], PHP_INT_MAX);
Expand All @@ -52,12 +45,9 @@ function added_dependencies($dependencies = [])
]);
}

<<<<<<< HEAD
/**
* @param $screen
*/
=======
>>>>>>> ea8ce5d (Cleanups)
function admin_enqueue_scripts($screen)
{
if ($screen == $this->page) {
Expand Down
8 changes: 0 additions & 8 deletions includes/src/AutoUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
class AutoUpdate
{
/**
<<<<<<< HEAD
* @var static $instance
=======
* @var static $instance
>>>>>>> ea8ce5d (Cleanups)
*/
private static $instance = null;

Expand Down Expand Up @@ -108,13 +104,9 @@ function cleanup()
);
}
}
<<<<<<< HEAD
/**
* @return self
*/
=======

>>>>>>> ea8ce5d (Cleanups)
public static function get_instance()
{
if (is_null(self::$instance)) {
Expand Down
10 changes: 0 additions & 10 deletions includes/src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ public static function engine_post(string $path, $data = [], $cache = false)
'body' => $content_body,
]
);
<<<<<<< HEAD
=======
/**
* @var array
*/
>>>>>>> ea8ce5d (Cleanups)
$body = json_decode(wp_remote_retrieve_body($result), true);
if (
is_wp_error($result) ||
Expand All @@ -45,11 +39,7 @@ public static function engine_post(string $path, $data = [], $cache = false)
) {
return new WP_Error(
400,
<<<<<<< HEAD
$body['message'] ?? __('Something went wrong')
=======
$body['message'] ?? __('Something went wrong', 'festingervault')
>>>>>>> ea8ce5d (Cleanups)
);
}
return $body;
Expand Down
7 changes: 0 additions & 7 deletions includes/src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@

namespace FestingerVault;

<<<<<<< HEAD
use WP_Error;
use Theme_Upgrader;
use Plugin_Upgrader;
use WP_Ajax_Upgrader_Skin;
=======
use Plugin_Upgrader;
use Theme_Upgrader;
use WP_Ajax_Upgrader_Skin;
use WP_Error;
>>>>>>> ea8ce5d (Cleanups)

class Installer
{
Expand Down
16 changes: 0 additions & 16 deletions includes/src/api/Announcement.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

use WP_Error;
use WP_REST_Request;
<<<<<<< HEAD
=======
use WP_REST_Response;
>>>>>>> ea8ce5d (Cleanups)

class Announcement extends ApiBase
{
Expand All @@ -20,26 +16,14 @@ public function endpoints()
],
];
}
<<<<<<< HEAD

=======
/**
* Get latest announcements
* @param WP_REST_Request $request
* @return WP_REST_Response|WP_Error
*/
>>>>>>> ea8ce5d (Cleanups)
public function latest(WP_REST_Request $request)
{
$url = 'https://meta.festingervault.com/c/announcements/11.json';
$key = 'fv_meta_topics';
$cached = get_transient($key);
if ($cached) {
<<<<<<< HEAD
return $cached;
=======
return rest_ensure_response($cached);
>>>>>>> ea8ce5d (Cleanups)
}
$request = wp_remote_get($url);
if (!is_wp_error($request)) {
Expand Down
45 changes: 0 additions & 45 deletions includes/src/api/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class Collection extends ApiBase
{
function list_collection(\WP_REST_Request $request)
{
<<<<<<< HEAD
return Helper::engine_post('collection/list', [
'page' => $request->get_param('page'),
]);
Expand All @@ -35,62 +34,18 @@ function collection_delete(\WP_REST_Request $request)
function add_collection(\WP_REST_Request $request)
{
return Helper::engine_post('collection/add', [
=======
$result = Helper::engine_post('collection/list', [
'page' => $request->get_param('page'),
]);
return rest_ensure_response($result);
}
function list_items(\WP_REST_Request $request)
{
$result = Helper::engine_post('collection/items', [
'id' => $request->get_param('id'),
'page' => $request->get_param('page'),
]);
return rest_ensure_response($result);
}
function collection_detail(\WP_REST_Request $request)
{
$result = Helper::engine_post('collection/detail', [
'id' => $request->get_param('id'),
]);
return rest_ensure_response($result);
}
function collection_delete(\WP_REST_Request $request)
{
$result = Helper::engine_post('collection/delete', [
'id' => $request->get_param('id'),
]);
return rest_ensure_response($result);
}
function add_collection(\WP_REST_Request $request)
{
$result = Helper::engine_post('collection/add', [
>>>>>>> ea8ce5d (Cleanups)
'id' => $request->get_param('id'),
'public' => $request->get_param('public'),
'title' => $request->get_param('title'),
'summary' => $request->get_param('summary'),
]);
<<<<<<< HEAD
}
function add_item(\WP_REST_Request $request)
{
return Helper::engine_post('collection/item/add', [
'group_id' => $request->get_param('cid'),
'item_id' => $request->get_param('id'),
]);
=======
return rest_ensure_response($result);
}
function add_item(\WP_REST_Request $request)
{
$result = Helper::engine_post('collection/item/add', [
'group_id' => $request->get_param('cid'),
'item_id' => $request->get_param('id'),
]);
return rest_ensure_response($result);
>>>>>>> ea8ce5d (Cleanups)
}

public function endpoints()
Expand Down
19 changes: 0 additions & 19 deletions includes/src/api/History.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,20 @@
namespace FestingerVault\api;

use FestingerVault\Helper;
<<<<<<< HEAD
use WP_REST_Request;
=======
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;
>>>>>>> ea8ce5d (Cleanups)

class History extends ApiBase
{
/**
<<<<<<< HEAD
* @param WP_REST_Request $request
* @return mixed
=======
* Summary of list
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
>>>>>>> ea8ce5d (Cleanups)
*/
public function list(WP_REST_Request $request)
{
$page = $request->get_param('page');
<<<<<<< HEAD
return Helper::engine_post('history/list', [
'page' => $page,
]);
=======
$result = Helper::engine_post('history/list', [
'page' => $page,
]);
return rest_ensure_response($result);
>>>>>>> ea8ce5d (Cleanups)
}

public function endpoints()
Expand Down
Loading

0 comments on commit 1954af5

Please sign in to comment.