-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
197 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace PluginPlaceholder\Includes; | ||
|
||
class Activator { | ||
|
||
public static function activate() { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace PluginPlaceholder\Includes; | ||
|
||
class Deactivator { | ||
|
||
public static function deactivate() { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
namespace PluginPlaceholder\Includes; | ||
|
||
use PluginPlaceholder\Admin\AdminMenus; | ||
use PluginPlaceholder\Admin\AjaxActions; | ||
use PluginPlaceholder\Admin\PostActions; | ||
|
||
use PluginPlaceholder\General\ApiEndpoints; | ||
use PluginPlaceholder\General\CustomFields; | ||
use PluginPlaceholder\General\CustomPostTypes; | ||
use PluginPlaceholder\General\Routes; | ||
use PluginPlaceholder\General\Shortcodes; | ||
use PluginPlaceholder\General\Taxonomies; | ||
|
||
use PluginPlaceholder\React\ReactLoader; | ||
|
||
class Loader { | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
public function __construct() { | ||
$this->plugin_version = defined( 'PLUGIN_PLACEHOLDER_VERSION' ) ? PLUGIN_PLACEHOLDER_VERSION : '1.0.0'; | ||
$this->plugin_name = 'plugin-placeholder'; | ||
$this->load_dependencies(); | ||
} | ||
|
||
private function load_dependencies() { | ||
\PluboRoutes\PluboRoutesProcessor::init(); | ||
|
||
$plugin_i18n = new Languages(); | ||
|
||
$react = new ReactLoader( $this->plugin_name, $this->plugin_version ); | ||
|
||
$admin_menus = new AdminMenus($this->plugin_name, $this->plugin_version); | ||
$ajax_actions = new AjaxActions($this->plugin_name, $this->plugin_version); | ||
$post_actions = new PostActions($this->plugin_name, $this->plugin_version); | ||
|
||
$api_endpoints = new ApiEndpoints($this->plugin_name, $this->plugin_version); | ||
$custom_fields = new CustomFields($this->plugin_name, $this->plugin_version); | ||
$custom_post_types = new CustomPostTypes($this->plugin_name, $this->plugin_version); | ||
$routes = new Routes($this->plugin_name, $this->plugin_version); | ||
$shortcodes = new Shortcodes($this->plugin_name, $this->plugin_version); | ||
$taxonomies = new Taxonomies($this->plugin_name, $this->plugin_version); | ||
|
||
add_filter( 'do_shortcode_tag', function($output, $tag, $attr) { | ||
return "<span style='display: none;' class='plubo-shortcode' data-tag='$tag'></span>" . $output; | ||
}, 22, 3); | ||
|
||
add_action('wp_enqueue_scripts', function () { | ||
wp_enqueue_style('plugin-placeholder/app.css', PLUGIN_PLACEHOLDER_URL . 'dist/app.css', false, null); | ||
wp_enqueue_script('plugin-placeholder/app.js', PLUGIN_PLACEHOLDER_URL . 'dist/app.js', [], null, true); | ||
|
||
wp_localize_script( 'plugin-placeholder/app.js', 'plugin_placeholder_ajax', array( | ||
'ajaxurl' => admin_url( 'admin-ajax.php' ), | ||
'nonce' => wp_create_nonce( 'ajax-nonce' ), | ||
) ); | ||
}, 100); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace PluginPlaceholder\Includes; | ||
|
||
class Utils | ||
{ | ||
private static $instance = NULL; | ||
|
||
private function __construct() { | ||
|
||
} | ||
|
||
// Clone not allowed | ||
private function __clone() { } | ||
|
||
public static function getInstance() { | ||
if ( is_null(self::$instance) ) { | ||
self::$instance = new Utils(); | ||
} | ||
return self::$instance; | ||
} | ||
|
||
public function make_directive(string $name, callable $handler) { | ||
$this->blade->directive($name, $handler); | ||
} | ||
|
||
public function template( $name, $args=array() ) { | ||
return $this->blade->render($name, $args); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.