getIntance TO get_instance

This commit is contained in:
andre2ar 2018-04-11 11:26:46 -03:00
parent 9e0f467db7
commit 105465ee06
9 changed files with 17 additions and 17 deletions

View File

@ -396,7 +396,7 @@ class Field extends Entity {
}
}
if ( $this->get_field_type() == 'Tainacan\Field_Types\Compound' && $this->is_multiple() ) {
$Tainacan_fields = \Tainacan\Repositories\Fields::getInstance();
$Tainacan_fields = \Tainacan\Repositories\Fields::get_instance();
$children = $Tainacan_fields->fetch(
[
'parent' => $this->get_id(),

View File

@ -448,8 +448,8 @@ class Item extends Entity {
*/
public function get_metadata_as_html($field = null, $hide_empty = true) {
$Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::getInstance();
$Tainacan_Fields = \Tainacan\Repositories\Fields::getInstance();
$Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance();
$Tainacan_Fields = \Tainacan\Repositories\Fields::get_instance();
$return = '';

View File

@ -37,7 +37,7 @@ $Tainacan_Admin = \Tainacan\Admin::get_instance();
require_once('theme-helper/class-tainacan-theme-helper.php');
require_once('theme-helper/template-tags.php');
$Tainacan_Admin = \Tainacan\Theme_Helper::getInstance();
$Tainacan_Admin = \Tainacan\Theme_Helper::get_instance();
function tainacan_load_plugin_textdomain() {
load_plugin_textdomain( 'tainacan', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );

View File

@ -8,7 +8,7 @@ class Theme_Helper {
private static $instance = null;
public static function getInstance() {
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}

View File

@ -19,7 +19,7 @@ use Tainacan\Entities;
*/
function get_tainacan_the_metadata($field = null, $hide_empty = true) {
$post = get_post();
$theme_helper = \Tainacan\Theme_Helper::getInstance();
$theme_helper = \Tainacan\Theme_Helper::get_instance();
if (!$theme_helper->is_post_an_item($post));
return;

View File

@ -194,8 +194,8 @@ class TAINACAN_REST_Terms extends TAINACAN_UnitApiTestCase {
true
);
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::getInstance();
$Tainacan_Terms = \Tainacan\Repositories\Terms::getInstance();
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance();
$Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance();
$new_attributes = [
'hideempty' => false,

View File

@ -250,7 +250,7 @@ class CompoundFieldTypes extends TAINACAN_UnitTestCase {
function test_validations_category_in_multiple() {
$Tainacan_Fields = \Tainacan\Repositories\Fields::getInstance();
$Tainacan_Fields = \Tainacan\Repositories\Fields::get_instance();
$collection = $this->tainacan_entity_factory->create_entity(
'collection',
@ -288,7 +288,7 @@ class CompoundFieldTypes extends TAINACAN_UnitTestCase {
function test_validations_category_in_multiple_2() {
$Tainacan_Fields = \Tainacan\Repositories\Fields::getInstance();
$Tainacan_Fields = \Tainacan\Repositories\Fields::get_instance();
$collection = $this->tainacan_entity_factory->create_entity(
'collection',
@ -328,7 +328,7 @@ class CompoundFieldTypes extends TAINACAN_UnitTestCase {
function test_validations_multiple_fields() {
$Tainacan_Fields = \Tainacan\Repositories\Fields::getInstance();
$Tainacan_Fields = \Tainacan\Repositories\Fields::get_instance();
$collection = $this->tainacan_entity_factory->create_entity(
'collection',

View File

@ -26,8 +26,8 @@ class Logs extends TAINACAN_UnitTestCase {
* Teste da insercao de um log simples apenas se criar o dado bruto
*/
function test_add() {
$Tainacan_Logs = \Tainacan\Repositories\Logs::getInstance();
$Tainacan_Collections = \Tainacan\Repositories\Collections::getInstance();
$Tainacan_Logs = \Tainacan\Repositories\Logs::get_instance();
$Tainacan_Collections = \Tainacan\Repositories\Collections::get_instance();
$log = $this->tainacan_entity_factory->create_entity(
'log',
@ -135,8 +135,8 @@ class Logs extends TAINACAN_UnitTestCase {
$Tainacan_Logs = \Tainacan\Repositories\Logs::get_instance();
$Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance();
public function test_log_diff() {
$Tainacan_Logs = \Tainacan\Repositories\Logs::getInstance();
$Tainacan_Filters = \Tainacan\Repositories\Filters::getInstance();
$Tainacan_Logs = \Tainacan\Repositories\Logs::get_instance();
$Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance();
$filter = $this->tainacan_entity_factory->create_entity(
'filter',

View File

@ -83,8 +83,8 @@ class Taxonomies extends TAINACAN_UnitTestCase {
true
);
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::getInstance();
$Tainacan_Terms = \Tainacan\Repositories\Terms::getInstance();
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance();
$Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance();
$terms = $Tainacan_Terms->fetch(['hide_empty' => false], $taxonomy->get_id());