Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
davideC00 committed Sep 4, 2019
1 parent 5acee6d commit af11cb0
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 30 deletions.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,56 @@
# simple-metadata-relation
# Simple Metadata Relation

* Contributors: @colomet, @davideC00
* Donate link: https://opencollective.com/mylanguageskills
* Tags: wordpress, simple metadata, metadata, relation
* Requires at least: 4.9.6
* Tested up to: 5.2.2
* Requires PHP: 7.0
* Stable tag: 1.0
* License: GNU 3.0
* License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
* Gutenberg: compatible

## Description
This addon defines the relationship between the content and other content, if any.

## Installation
1. Clone (or copy) this repository to the /wp-content/plugins/ directory.
2. Activate the plugin through the 'Plugins' screen in WordPress.

## Frequently Asked Questions
1. If i don't need to use all the fields of the plugin, can i leave them empty? Yes, you can leaves them empty. If one field is empty the link will not appear in the frontend.

## Requirements
Plugin works with:

- ![PHP](https://img.shields.io/badge/PHP-7.2.X-blue.svg)
- ![WordPress](https://img.shields.io/badge/WordPress-4.9.8-blue.svg)

## Disclaimers
The Simple Metadata Relation plugin is supplied "as is" and all use is at your own risk.

## Roadmap

## Changelog
Take a look at detailed changelog [here](/doc/CHANGELOG.md)


### 1.0
* Initial release
* Resources
* Bibliography
* json-ld metadata


## Credits

Here's a link to [WordPress](https://wordpress.org/)

Here's a llink to [PressBooks](https://pressbooks.org/get-involved/)

Here's a link to [Markdown's Syntax Documentation](https://daringfireball.net/projects/markdown/syntax)

---

[Up](/README.md)
2 changes: 2 additions & 0 deletions admin/smdre-bibliography/smdre-bibliography-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function smdre_print_tags_bibliography($post_id){
return $metadata;
}

// Fills the citations_metadata array with all the values
foreach($meta_values as $id => $meta_value){
if(!empty($meta_value)){
$citation_metadata = [[
Expand All @@ -37,6 +38,7 @@ function smdre_print_tags_bibliography($post_id){
}
}

// add citations to the metadata array
if(!empty($citations_metadata)){
$metadata['citation'] = $citations_metadata;
}
Expand Down
6 changes: 5 additions & 1 deletion admin/smdre-resources/smdre-resources-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ function smdre_print_tags_resources($post_id){
continue;
}

// Fills the resources metadata with all the values from post_meta
foreach($meta_values as $id => $meta_value){
if(!empty($meta_value)){
//there is the meta_value for this row
// There is the meta_value for this row

// The object for the current resource
$resorce_metadata = [[
'type' => 'CreativeWork',
'url' => $meta_value,
'learningResourceType' => $learningResourceType
]];

// Add the resource to the resources array
$resources_metadata = array_merge($resources_metadata, $resorce_metadata);
}
}
Expand Down
19 changes: 19 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

# 1.0

* Metaboxes
* **Added** Bibliography
* **Added** Citations

* **Added** Resources
* **Added** Activities
* **Added** Exercises
* **Added** Audios
* **Added** Videos

* Properties
* Resources
* **Added** hasPart
* Bibliography
* **Added** citation
40 changes: 12 additions & 28 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,20 @@
=== Simple metadata relation ===
Contributors: colomet,
Contributors: colomet, davideC00
Donate link: https://opencollective.com/mylanguageskills
Tags: multisite, pressbooks, simple metadata, metadata, schema.org, rich snippets, wordpress-plugin,
Requires at least: 5.2
Tags: wordpress, simple metadata, metadata, relation
Requires at least: 4.9.6
Tested up to: 5.2.2
Stable tag: 1.3
Stable tag: 1.0
Requires PHP: 5.6
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Gutenberg: compatible

This plugin enhance [Simple metadata](https://github.com/my-language-skills/simple-metadata) with metametadata related metadata.

== Description ==

This plugin provides the ability to have XXX metafield with the XXX schema properties.


== Front-page related content =


* Properties
* Creative Work type
* **Added:** xxxxx property


= Pages related content =

* Properties
* Creative Work type
* **Added:** xxxx property


= Posts and CPTs related content =

* Creative Work type
* **Added:** xxxx property

This addon defines the relationship between the content and other content, if any.

== Installation ==

Expand Down Expand Up @@ -77,7 +56,12 @@ As Simple metadata annotation is an extension of Simple metadata, visit the [Sim
== Changelog ==

= 1.0 =
* Initial release.

- Initial release
- Resources
- Bibliography
- json-ld metadata



== Upgrade Notice ==
Expand Down

0 comments on commit af11cb0

Please sign in to comment.