-
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.
Merge pull request #43 from joanrodas/dev
Dev
- Loading branch information
Showing
57 changed files
with
8,481 additions
and
3,302 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.php] | ||
indent_size = 4 | ||
|
||
[*.blade.php] | ||
indent_size = 4 | ||
|
||
[resources/views/**.php] | ||
indent_size = 4 | ||
|
||
[index.php] | ||
indent_size = 4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.gitattributes export-ignore | ||
/.github export-ignore |
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ yarn-error.log | |
/vendor | ||
resources/assets/config-local.json | ||
.budfiles | ||
resources/cache | ||
resources/cache |
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 |
---|---|---|
@@ -1,34 +1,34 @@ | ||
module.exports = { | ||
'extends': 'stylelint-config-standard', | ||
'rules': { | ||
'no-empty-source': null, | ||
'string-quotes': 'double', | ||
'at-rule-no-unknown': [ | ||
true, | ||
{ | ||
'ignoreAtRules': [ | ||
'extend', | ||
'at-root', | ||
'debug', | ||
'warn', | ||
'error', | ||
'if', | ||
'else', | ||
'for', | ||
'each', | ||
'while', | ||
'mixin', | ||
'include', | ||
'content', | ||
'return', | ||
'function', | ||
'tailwind', | ||
'apply', | ||
'responsive', | ||
'variants', | ||
'screen', | ||
], | ||
}, | ||
], | ||
}, | ||
'extends': 'stylelint-config-standard', | ||
'rules': { | ||
'no-empty-source': null, | ||
'string-quotes': 'double', | ||
'at-rule-no-unknown': [ | ||
true, | ||
{ | ||
'ignoreAtRules': [ | ||
'extend', | ||
'at-root', | ||
'debug', | ||
'warn', | ||
'error', | ||
'if', | ||
'else', | ||
'for', | ||
'each', | ||
'while', | ||
'mixin', | ||
'include', | ||
'content', | ||
'return', | ||
'function', | ||
'tailwind', | ||
'apply', | ||
'responsive', | ||
'variants', | ||
'screen', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,42 +1,46 @@ | ||
<?php | ||
|
||
namespace PluginPlaceholder\Admin; | ||
|
||
use PluginPlaceholder\Includes\BladeLoader; | ||
|
||
class AdminMenus { | ||
class AdminMenus | ||
{ | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
private $blade; | ||
|
||
public function __construct( $plugin_name, $plugin_version ) { | ||
public function __construct($plugin_name, $plugin_version) | ||
{ | ||
$this->plugin_name = $plugin_name; | ||
$this->plugin_version = $plugin_version; | ||
$this->blade = BladeLoader::getInstance(); | ||
|
||
add_action( 'admin_menu', array($this, 'add_admin_menus') ); | ||
add_action('admin_menu', array($this, 'add_admin_menus')); | ||
} | ||
|
||
public function add_admin_menus() { | ||
public function add_admin_menus() | ||
{ | ||
|
||
// EXAMPLE | ||
// add_menu_page( | ||
// __( 'Custom Page Routes', 'custom-page-routes' ), | ||
// __( 'Custom Page Routes', 'custom-page-routes' ), | ||
// 'manage_options', | ||
// 'custom-page-routes', | ||
// function() { | ||
// __( 'Custom Page Routes', 'custom-page-routes' ), | ||
// __( 'Custom Page Routes', 'custom-page-routes' ), | ||
// 'manage_options', | ||
// 'custom-page-routes', | ||
// function() { | ||
// $this->display_template('settings'); | ||
// }, | ||
// 'dashicons-admin-settings', | ||
// 6 | ||
// ); | ||
// 'dashicons-admin-settings', | ||
// 6 | ||
// ); | ||
|
||
} | ||
|
||
private function display_template(string $template) { | ||
echo $this->blade->template($template); | ||
private function display_template(string $template) | ||
{ | ||
// echo $this->blade->template($template); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,36 +1,43 @@ | ||
<?php | ||
|
||
namespace PluginPlaceholder\Admin; | ||
|
||
class AjaxActions { | ||
class AjaxActions | ||
{ | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
public function __construct( $plugin_name, $plugin_version ) { | ||
public function __construct($plugin_name, $plugin_version) | ||
{ | ||
$this->plugin_name = $plugin_name; | ||
$this->plugin_version = $plugin_version; | ||
$this->add_ajax_actions(); | ||
} | ||
|
||
private function add_ajax_non_logged_in_action($action, $function) { | ||
add_action( "wp_ajax_nopriv_{$action}", array($this, $function) ); | ||
private function add_ajax_non_logged_in_action($action, $function) | ||
{ | ||
add_action("wp_ajax_nopriv_{$action}", array($this, $function)); | ||
} | ||
|
||
private function add_ajax_logged_in_action($action, $function) { | ||
add_action( "wp_ajax_{$action}", array($this, $function) ); | ||
private function add_ajax_logged_in_action($action, $function) | ||
{ | ||
add_action("wp_ajax_{$action}", array($this, $function)); | ||
} | ||
|
||
private function add_ajax_general_action($action, $function) { | ||
private function add_ajax_general_action($action, $function) | ||
{ | ||
$this->add_ajax_non_logged_in_action($action, $function); | ||
$this->add_ajax_logged_in_action($action, $function); | ||
} | ||
|
||
private function add_ajax_actions() { | ||
private function add_ajax_actions() | ||
{ | ||
//$this->add_ajax_logged_in_action('my_action', 'example_function'); | ||
} | ||
|
||
public function example_function() { | ||
public function example_function() | ||
{ | ||
//AJAX ACTION CODE | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
<?php | ||
|
||
namespace PluginPlaceholder\Admin; | ||
|
||
class Crons { | ||
class Crons | ||
{ | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
public function __construct( $plugin_name, $plugin_version ) { | ||
public function __construct($plugin_name, $plugin_version) | ||
{ | ||
$this->plugin_name = $plugin_name; | ||
$this->plugin_version = $plugin_version; | ||
$this->add_crons(); | ||
} | ||
|
||
private function add_crons() { | ||
|
||
private function add_crons() | ||
{ | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
<?php | ||
|
||
namespace PluginPlaceholder\Admin; | ||
|
||
use PluginPlaceholder\Includes\BladeLoader; | ||
|
||
class Emails { | ||
class Emails | ||
{ | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
private $blade; | ||
|
||
public function __construct( $plugin_name, $plugin_version ) { | ||
public function __construct($plugin_name, $plugin_version) | ||
{ | ||
$this->plugin_name = $plugin_name; | ||
$this->plugin_version = $plugin_version; | ||
$this->blade = BladeLoader::getInstance(); | ||
|
||
$this->send_emails(); | ||
} | ||
|
||
private function send_emails() { | ||
|
||
private function send_emails() | ||
{ | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,36 +1,43 @@ | ||
<?php | ||
|
||
namespace PluginPlaceholder\Admin; | ||
|
||
class PostActions { | ||
class PostActions | ||
{ | ||
|
||
protected $plugin_name; | ||
protected $plugin_version; | ||
|
||
public function __construct( $plugin_name, $plugin_version ) { | ||
public function __construct($plugin_name, $plugin_version) | ||
{ | ||
$this->plugin_name = $plugin_name; | ||
$this->plugin_version = $plugin_version; | ||
$this->add_post_actions(); | ||
} | ||
|
||
private function add_post_non_logged_in_action($action, $function) { | ||
add_action( "admin_post_nopriv_{$action}", array($this, $function) ); | ||
|
||
private function add_post_non_logged_in_action($action, $function) | ||
{ | ||
add_action("admin_post_nopriv_{$action}", array($this, $function)); | ||
} | ||
|
||
private function add_post_logged_in_action($action, $function) { | ||
add_action( "admin_post_{$action}", array($this, $function) ); | ||
|
||
private function add_post_logged_in_action($action, $function) | ||
{ | ||
add_action("admin_post_{$action}", array($this, $function)); | ||
} | ||
|
||
private function add_post_action($action, $function) { | ||
private function add_post_action($action, $function) | ||
{ | ||
$this->add_post_non_logged_in_action($action, $function); | ||
$this->add_post_logged_in_action($action, $function); | ||
} | ||
|
||
private function add_post_actions() { | ||
private function add_post_actions() | ||
{ | ||
//$this->add_post_action($action, 'example_function'); | ||
} | ||
|
||
public function example_function() { | ||
public function example_function() | ||
{ | ||
//POST ACTION CODE | ||
} | ||
|
||
} |
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.