Skip to content

Commit

Permalink
Fix v0.19.12
Browse files Browse the repository at this point in the history
  • Loading branch information
GiorgioKM committed Jun 19, 2017
1 parent a236a3f commit affb039
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

#### v0.19.12 - 19 Giugno 2017
* Risolto un problema quando la classe veniva instanziata più di una volta

#### v0.19.1 - 14 Giugno 2017
* Aggiunto un parametro di tipo booleano nel metodo 'returnAllMeta($includeAllPosts = false)'. Se impostato a true, forzerà il metodo a ritornare con tutti i post

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MetaBoxesHandler
================

![Build Status](https://img.shields.io/badge/build-v0.19.1-green.svg?style=flat)
![Build Status](https://img.shields.io/badge/build-v0.19.12-green.svg?style=flat)

È un utility per Wordpress per la gestione automatizzata di metabox da utilizzare con un custom post type, sia lato backend che frontend.

Expand All @@ -22,15 +22,18 @@ Crediti
|Tipo|Descrizione|
|:---|---:|
|@autore|Giorgio Suadoni|
|@versione|0.19.1|
|@data ultimo aggiornamento|14 Giugno 2017|
|@versione|0.19.12|
|@data ultimo aggiornamento|19 Giugno 2017|
|@data prima versione|20 Maggio 2017|



Changelog
---------

#### v0.19.12 - 19 Giugno 2017
* Risolto un problema quando la classe veniva instanziata più di una volta

#### v0.19.1 - 14 Giugno 2017
* Aggiunto un parametro di tipo booleano nel metodo 'returnAllMeta($includeAllPosts = false)'. Se impostato a true, forzerà il metodo a ritornare con tutti i post

Expand Down
34 changes: 20 additions & 14 deletions dist/MetaBoxesHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*
* È un utility per Wordpress per la gestione automatizzata di metabox da utilizzare con un custom post type, sia lato backend che frontend.
*
* @versione 0.19.1
* @versione 0.19.12
* @data ultimo aggiornamento 19 Giugno 2017
* @data prima versione 20 Maggio 2017
* @data ultimo aggiornamento 14 Giugno 2017
*
* @autore Giorgio Suadoni
* @wiki https://github.com/GiorgioKM/MetaBoxesHandler/wiki/
Expand Down Expand Up @@ -112,20 +112,26 @@ class MetaBoxesHandler extends BaseMBH {
public function __construct($lang = false) {
parent::__construct($lang);

wp_enqueue_script('mbh-base', BASE_MBH_URI .'/js/mbh-base.js', array('jquery'), filemtime(BASE_MBH .'/js/mbh-base.js'), true);
wp_localize_script('mbh-base', 'mbh_vars', array(
'save_confirm_delete' => parent::_getTranslate('save_confirm_delete'),
'save_confirm_mod' => parent::_getTranslate('save_confirm_mod'),
'select_media_image' => parent::_getTranslate('select_media_image'),
'use_this_image' => parent::_getTranslate('use_this_image'),
'change_image' => parent::_getTranslate('change_image'),
'set_image' => parent::_getTranslate('set_image'),
));
if (!wp_script_is('mbh-base')) {
wp_enqueue_script('mbh-base', BASE_MBH_URI .'/js/mbh-base.js', array('jquery'), filemtime(BASE_MBH .'/js/mbh-base.js'), true);
wp_localize_script('mbh-base', 'mbh_vars', array(
'save_confirm_delete' => parent::_getTranslate('save_confirm_delete'),
'save_confirm_mod' => parent::_getTranslate('save_confirm_mod'),
'select_media_image' => parent::_getTranslate('select_media_image'),
'use_this_image' => parent::_getTranslate('use_this_image'),
'change_image' => parent::_getTranslate('change_image'),
'set_image' => parent::_getTranslate('set_image'),
));
}

if (!wp_script_is('wp-upload-image'))
wp_register_script('wp-upload-image', BASE_MBH_URI .'/js/wp-upload-image.js', array('jquery'), filemtime(BASE_MBH .'/js/wp-upload-image.js'), true);

wp_register_script('wp-upload-image', BASE_MBH_URI .'/js/wp-upload-image.js', array('jquery'), filemtime(BASE_MBH .'/js/wp-upload-image.js'), true);
wp_register_script('custom-attachment', BASE_MBH_URI .'/js/custom-attachment.js', array('jquery'), filemtime(BASE_MBH .'/js/custom-attachment.js'), true);
if (!wp_script_is('custom-attachment'))
wp_register_script('custom-attachment', BASE_MBH_URI .'/js/custom-attachment.js', array('jquery'), filemtime(BASE_MBH .'/js/custom-attachment.js'), true);

wp_enqueue_style('mbh-style', BASE_MBH_URI .'/css/mbh-style.css', null, filemtime(BASE_MBH .'/css/mbh-style.css'));
if (!wp_script_is('mbh-style'))
wp_enqueue_style('mbh-style', BASE_MBH_URI .'/css/mbh-style.css', null, filemtime(BASE_MBH .'/css/mbh-style.css'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/includes/BaseMBH.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ private function _checkRequiredFieldsInPOST($__POSTS) {
* @accesso privato
*/
private function loadTranslations() {
require_once('translations.php');
include 'translations.php';

$this->listTranslations = $translations;
}
Expand Down

0 comments on commit affb039

Please sign in to comment.