diff --git a/addtoany.views.inc b/addtoany.views.inc new file mode 100644 index 0000000000000000000000000000000000000000..8956e61941de0bd7bf5059976a62b9276fa078c9 --- /dev/null +++ b/addtoany.views.inc @@ -0,0 +1,21 @@ + t('AddToAny share buttons'), + 'field' => array( + 'title' => t('AddToAny share buttons'), + 'help' => t('Provide share buttons for sharing the content.'), + 'id' => 'node_addtoany_share', + ), + ); +} diff --git a/src/Plugin/views/field/NodeAddToAnyShare.php b/src/Plugin/views/field/NodeAddToAnyShare.php new file mode 100644 index 0000000000000000000000000000000000000000..926573d0dd625baa1c51b58e63b3d1884a3ef6e6 --- /dev/null +++ b/src/Plugin/views/field/NodeAddToAnyShare.php @@ -0,0 +1,41 @@ +_entity; + if ($entity->access('view')) { + return array( + '#theme' => 'addtoany_standard', + '#addtoany_html' => addtoany_create_node_buttons($entity), + ); + } + } +} diff --git a/views/addtoany.views.inc b/views/addtoany.views.inc deleted file mode 100644 index aceffa637ffbcb720c32e82aa6a114844b58f558..0000000000000000000000000000000000000000 --- a/views/addtoany.views.inc +++ /dev/null @@ -1,23 +0,0 @@ - t('AddToAny link'), - 'help' => t('Link provided by the AddToAny module'), - 'group' => t('Content'), - 'field' => array( - 'handler' => 'addtoany_handler_field_addtoany_link', - 'click sortable' => FALSE, - ) - ); - return $data; -}