All Projects → daggerhart → taxonomy-term-image

daggerhart / taxonomy-term-image

Licence: other
Example plugin for adding an image upload field to taxonomy terms in WordPress

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to taxonomy-term-image

Raskoh
Raskoh - easy and object oriented way to interact with WordPress custom post types and taxonomies.
Stars: ✭ 12 (-76%)
Mutual labels:  taxonomy
naturtag
Tag your nature photos with iNat taxonomy and observation metadata
Stars: ✭ 20 (-60%)
Mutual labels:  taxonomy
general
The Catalogue of Life
Stars: ✭ 39 (-22%)
Mutual labels:  taxonomy
skos-play
SKOS-Play allows to print SKOS files in HTML or PDF. It also embeds xls2rdf to generate RDF from Excel.
Stars: ✭ 58 (+16%)
Mutual labels:  taxonomy
pr2database
Protist Ribosomal Reference database (PR2) - SSU rRNA gene database
Stars: ✭ 54 (+8%)
Mutual labels:  taxonomy
Sitegeist.Taxonomy
Manage vocabularies and taxonomies as separate node-hierarchy.
Stars: ✭ 14 (-72%)
Mutual labels:  taxonomy
flora-on-server
Work collaboratively in IUCN Red List assessments and manage online biodiversity databases, including a graph-based taxonomy system, species traits and habitats, and species occurrences.
Stars: ✭ 13 (-74%)
Mutual labels:  taxonomy
taxid-changelog
NCBI taxonomic identifier (taxid) changelog, including taxids deletion, new adding, merge, reuse, and rank/name changes.
Stars: ✭ 13 (-74%)
Mutual labels:  taxonomy
virion
The Global Virome in One Network
Stars: ✭ 27 (-46%)
Mutual labels:  taxonomy
wp-term-meta-ui
A base UI class for a term metadata user interface
Stars: ✭ 23 (-54%)
Mutual labels:  taxonomy
venue-taxonomy
The intention of this project is to standardize the list of venue types that represent Digital-Out-of-Home (DOOH) advertising screens within a programmatic OpenRTB 2.5 context. The systematization of DOOH venue types will allow for clearer targeting by media buying platforms across a spectrum of available supply-side platforms offering DOOH inve…
Stars: ✭ 26 (-48%)
Mutual labels:  taxonomy
laravel-tags
Rinvex Taggable is a polymorphic Laravel package, for tag management. You can tag any eloquent model with ease, and utilize the awesomeness of Sluggable, and Translatable models out of the box.
Stars: ✭ 23 (-54%)
Mutual labels:  taxonomy
kraken-biom
Create BIOM-format tables (http://biom-format.org) from Kraken output (http://ccb.jhu.edu/software/kraken/, https://github.com/DerrickWood/kraken).
Stars: ✭ 35 (-30%)
Mutual labels:  taxonomy
multitax
Python package to obtain, parse and explore biological taxonomies (GTDB, NCBI, Silva, Greengenes, OTT)
Stars: ✭ 22 (-56%)
Mutual labels:  taxonomy
grav-plugin-taxonomylist
Grav TaxonomyList Plugin
Stars: ✭ 19 (-62%)
Mutual labels:  taxonomy
pytaxize
python port of taxize (taxonomy toolbelt) for R
Stars: ✭ 29 (-42%)
Mutual labels:  taxonomy
arctos
Arctos is a museum collections management system
Stars: ✭ 39 (-22%)
Mutual labels:  taxonomy
TEAM
The Taxonomy for ETL Automation Metadata (TEAM) is a metadata management tool for data warehouse automation. It is part of the ecosystem for data warehouse automation, alongside the Virtual Data Warehouse pattern manager and the generic schema for Data Warehouse Automation.
Stars: ✭ 27 (-46%)
Mutual labels:  taxonomy
catalog-manager
Backend Module ohne Programmierkenntnisse erstellen.
Stars: ✭ 28 (-44%)
Mutual labels:  taxonomy
pytaxonkit
Python bindings for the TaxonKit library
Stars: ✭ 15 (-70%)
Mutual labels:  taxonomy

Taxonomy Term Image

An example plugin for adding an image upload field to taxonomy term edit pages, and an example of the new taxonomy term meta data added in WordPress 4.4. This example IS NOT compatible with any version of WordPress lower than 4.4, it is meant to be used as an example only.

How to use within a theme or plugin:

Setup file:

  1. Delete plugin meta data at the top of taxonomy-term-image.php
  2. include_once taxonomy-term-image.php

Hooks

filter taxonomy-term-image-taxonomy:

Change the taxonomy targeted by the plugin. By default, the category taxonomy is the only taxonomy targeted. You can change this to tags if you'd like following the example below:

	function the_term_image_taxonomy( $taxonomy ) {
		// use for tags instead of categories
		return 'post_tag';
	}
	add_filter( 'taxonomy-term-image-taxonomy', 'the_term_image_taxonomy' );

Alternatively, the plugin can target more than one taxonomy by providing it an array of taxonomy slugs:

	function the_term_image_taxonomy( $taxonomy ) {
		// use for tags and categories
		return array( 'post_tag', 'category' );
	}
	add_filter( 'taxonomy-term-image-taxonomy', 'the_term_image_taxonomy' );

filter taxonomy-term-image-labels:

Change the field and button text.

	function the_taxonomy_term_image_labels( $labels ) {
		$labels['fieldTitle'] = __( 'My Super Rad Plugin', 'yourdomain' );
		$labels['fieldDescription'] = __( 'This plugin is cool, and does neat stuff.', 'yourdomain' );

		return $labels;
	}
	add_filter( 'taxonomy-term-image-labels', 'the_taxonomy_term_image_labels' );

filter taxonomy-term-image-meta-key:

Change the meta key used to save the image ID in the term meta data

	function the_taxonomy_term_image_meta_key( $option_name ) {
		// store in term meta where term meta key is = 'my_term_meta_key'
		return 'my_term_meta_key';
	}
	add_filter( 'taxonomy-term-image-meta-key', 'the_taxonomy_term_image_meta_key' );

filter taxonomy-term-image-js-dir-url:

Change where the js file is located. (no trailing slash)

	function my_taxonomy_term_image_js_dir_url( $option_name ) {
		// change the js directory to a subdirectory of this hook
		return plugin_dir_url( __FILE__ ) . '/js';
	}
	add_filter( 'taxonomy-term-image-js-dir-url', 'my_taxonomy_term_image_js_dir_url' );

show image on archive template

Term Image IDs are automatically attached to terms that are passed through the get_term and get_terms filters as the ->term_image property.

	$term = get_term( 123, 'category' );

	if ( $term->term_image ) {
		echo wp_get_attachment_image( $term->term_image, 'full' );
	}

In order to retrieve the term image on an archive page:

	$term = get_queried_object();

	if ( $term->term_image ) {
	    echo wp_get_attachment_image( $term->term_image, 'full' );
    }

References:

Articles:

Code References:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].