From dfe5259ff676201252d17a0c4d1a5924ad06b2c6 Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Tue, 29 May 2018 11:04:00 -0300 Subject: [PATCH] beginning view modes --- src/functions.php | 10 +++++++- src/tainacan/view-mode-cards.php | 44 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/tainacan/view-mode-cards.php diff --git a/src/functions.php b/src/functions.php index 18bf93c..c6a0230 100644 --- a/src/functions.php +++ b/src/functions.php @@ -52,7 +52,15 @@ if(!function_exists('tainacan_setup')) { 'flex-width' => true, ); add_theme_support( 'custom-logo', $logo_args ); - + + if (function_exists('tainacan_register_view_mode')) { + tainacan_register_view_mode('cards', [ + 'label' => 'Cards view', + 'description' => 'A Cards view', + 'icon' => '', + 'dynamic_metadata' => true, + ]); + } } diff --git a/src/tainacan/view-mode-cards.php b/src/tainacan/view-mode-cards.php new file mode 100644 index 0000000..098019b --- /dev/null +++ b/src/tainacan/view-mode-cards.php @@ -0,0 +1,44 @@ + + + + +
+ + + + +
+ +

+ +
+ +
+ +
+ + + +
+ +
+ + + + + +
+ + + Nenhum item encontrado +