Skip to content

Commit

Permalink
Ajout de l'external en brut
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-amandine committed Jan 17, 2019
1 parent 717d911 commit 5e76f83
Show file tree
Hide file tree
Showing 348 changed files with 68,979 additions and 0 deletions.
18 changes: 18 additions & 0 deletions core/external/eo-framework/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
tab_width = 4
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.txt]
trim_trailing_whitespace = false

[*.{md,json,yml}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
5 changes: 5 additions & 0 deletions core/external/eo-framework/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docs
output
npm-debug.log
docsjs
docsphp
63 changes: 63 additions & 0 deletions core/external/eo-framework/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
sudo: false
dist: trusty

language: php

notifications:
email:
on_success: never
on_failure: change

branches:
only:
- master

cache:
directories:
- $HOME/.composer/cache

matrix:
include:
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=trunk
- php: 5.6
env: WP_TRAVISCI=phpcs
- php: 5.3
env: WP_VERSION=latest
dist: precise

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
fi
script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit
WP_MULTISITE=1 phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
fi
674 changes: 674 additions & 0 deletions core/external/eo-framework/LICENSE

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions core/external/eo-framework/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# EO-Framework 1.0.0

EO Framework est une **surcouche** apportant des **fonctionnalités PHP supplémentaires** au framework de WordPress.
Nous avons fait en sorte que toutes les tâches répétitifs d'une création d'un plugin et surtout de sa maintenance soit réduite au maximum.

Avec **EO Framework**, nous vous offrons la possibilité d'utiliser très rapidement ce dont tout développeur WordPress à besoin.

## Fonctionnalités

* Bootage de plugin.
* Inclusion de "module" et "external" ou bien de plugin dépendant.
* Gestion des vues.
* REST API.
* Gestion de la définition de schéma pour vos données avec WPEO_Model.
* Gestion upload de fichier + gallery avec WPEO_Upload.
* Lib JS et CSS. (+ Minificateur JS et CSS automatique avec GULP)
* Gestion des logs.
* Gestion des conflits entre les différents plugins.

## Installation

Créer le dossier "core" et dedans le sous-dossier "external" puis taper la commande:

```bash
git submodule install https://github.com/Eoxia/eo-framework.git core/external/eo-framework
```

## Documentation

* Lire le [Getting Started](https://eoframework.eoxia.com/documentation/quickstart/) si c'est la première fois que vous utiliser EO-Framework.
* [Documentation](https://eoframework.eoxia/documentation)
* [Documentation CSS](https://shop.eoxia.com/wp-content/plugins/eo-framework-plugin/eo-framework/core/assets/examples/index.html)
* [Références PHP](https://eoframework.eoxia.com/docsphp/)
* [Références JS](https://eoframework.eoxia.com/docsjs/)

## Contribuer

* Faites des suggestions, déclarer un bug en passant par la page [Issues](https://github.com/Eoxia/eo-framework/issues) de GitHub.
* Suivez nous sur [GitHub](https://github.com/Eoxia) et [Twitter](https://twitter.com/eoxia).
103 changes: 103 additions & 0 deletions core/external/eo-framework/core/action/core.action.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?php
/**
* Inclusions de wpeo_assets
*
* @author Eoxia <dev@eoxia.com>
* @since 1.0.0
* @version 1.0.0
* @copyright 2015-2018 Eoxia
* @package EO_Framework\Core\Action
*/

namespace eoxia;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Inclusions de wpeo_assets
*/
class Core_Action {

/**
* Le constructeur ajoutes les actions WordPress suivantes:
* admin_enqueue_scripts (Pour appeller les scripts JS et CSS dans l'admin)
* wp_enqueue_script (Pour appeller les scripts JS et CSS dans le frontend)
*
* @since 1.0.0
* @version 1.0.0
*/
public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'callback_mixed_enqueue_scripts' ), 9 );
add_action( 'wp_enqueue_scripts', array( $this, 'callback_mixed_enqueue_scripts' ), 9 );
add_action( 'init', array( $this, 'callback_plugins_loaded' ) );
}

/**
* Initialise les fichiers JS inclus dans WordPress (jQuery, wp.media et thickbox)
*
* @since 1.0.0
* @version 1.0.0
*
* @return void
*/
public function callback_mixed_enqueue_scripts() {
wp_register_script( 'wpeo-assets-scripts', Config_Util::$init['eo-framework']->core->url . 'assets/js/dest/wpeo-assets.js', array( 'jquery' ), \eoxia\Config_Util::$init['eo-framework']->version, false );
// wp_register_script( 'wpeo-assets-fontawesome', Config_Util::$init['eo-framework']->core->url . 'assets/js/dest/font/fontawesome-all.min.js', array( 'jquery' ), \eoxia\Config_Util::$init['eo-framework']->version, false );
wp_enqueue_script( 'wpeo-assets-datepicker-js', Config_Util::$init['eo-framework']->core->url . 'assets/js/dest/jquery.datetimepicker.full.js', array( 'jquery' ), \eoxia\Config_Util::$init['eo-framework']->version, false );

wp_enqueue_style( 'wpeo-assets-styles', Config_Util::$init['eo-framework']->core->url . 'assets/css/style.min.css', \eoxia\Config_Util::$init['eo-framework']->version );
wp_enqueue_style( 'wpeo-assets-datepicker', Config_Util::$init['eo-framework']->core->url . 'assets/css/jquery.datetimepicker.css', array(), \eoxia\Config_Util::$init['eo-framework']->version );

wp_localize_script( 'wpeo-assets-scripts', 'wpeo_framework', $this->get_localize_script_data() );
wp_enqueue_script( 'wpeo-assets-scripts' );
// wp_enqueue_script( 'wpeo-assets-fontawesome' );
}

/**
* Renvoies les données pour les scripts JS.
*
* @since 1.0.0
* @version 1.0.0
*
* @return array {
* }.
*/
public function get_localize_script_data() {
ob_start();
require \eoxia\Config_Util::$init['eo-framework']->path . 'core/view/modal.view.php';
$view_modal = ob_get_clean();

ob_start();
require \eoxia\Config_Util::$init['eo-framework']->path . 'core/view/modal-title.view.php';
$view_modal_title = ob_get_clean();

ob_start();
require \eoxia\Config_Util::$init['eo-framework']->path . 'core/view/modal-buttons.view.php';
$view_modal_buttons = ob_get_clean();

$data = array(
'modalDefaultTitle' => $view_modal_title,
'modalView' => $view_modal,
'modalDefaultButtons' => $view_modal_buttons,
);

return $data;
}

/**
* Initialise le fichier MO
*
* @since 1.0.0
* @version 1.0.0
*/
public function callback_plugins_loaded() {
$plugin_dir = str_replace( '\\', '/', WP_PLUGIN_DIR );
$full_plugin_path = str_replace( '\\', '/', \eoxia\Config_Util::$init['main']->full_plugin_path );
$path = str_replace( $plugin_dir, '', $full_plugin_path );
load_plugin_textdomain( 'eoxia', false, $path . 'core/external/' . PLUGIN_EO_FRAMEWORK_DIR . '/core/assets/languages/' );
}
}

new Core_Action();
2 changes: 2 additions & 0 deletions core/external/eo-framework/core/assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
12 changes: 12 additions & 0 deletions core/external/eo-framework/core/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EoxiaJS

Framework JS by Eoxia. Current version 1.0.0-easy

# To do
### 1.1.0

* **action.backend.js**: Replace the three actions to one.
* Add comments in code
* Update wiki

[Wiki](https://github.com/Eoxia/EoxiaJS/wiki)
Binary file not shown.
Loading

0 comments on commit 5e76f83

Please sign in to comment.