Skip to main content
  1. All Posts/


Tools Open Source PHP WordPress
=== Magic Fields 2 Toolkit ===
Contributors: Magenta Cuda
Donate link:
Tags: shortcodes, templates, custom fields, post copier
Requires at least: 3.6
Tested up to: 4.2
Stable tag: 1.1
License: GPLv2 or later
License URI:
A toolkit for the Magic Fields 2 plugin for media oriented CMS web design by non programmers.

== Description ==
This [toolkit]( transforms the [Magic Fields 2]( plugin into something that can be used by a non programmer to do media oriented CMS web design.
With this toolkit you can design your page content using only HTML, CSS and the [toolkit's shortcodes](
Using the [toolkit's content templates]( you can define a reusable template for page contents which can be used to create multiple pages using the page's custom fields to instantiate the template.
This toolkit also simplifies the use of media (images, audio, video and embeds) by providing [configurable shortcodes]( for generating HTML wrappers for these media elements.

The current features are:

= Support for coding HTML templates without the need for PHP programming =
* [shortcode for showing Magic Fields 2 custom fields and taxonomies]( In particular, the shortcodes makes it easy to display a table of custom field names and their values.
* [post content templates for HTML and WordPress shortcodes]( - these templates do not need PHP code.
* (

= Additional custom fields =
* [fields for WordPress's video and audio shortcodes](
* An [enhanced image field]( that supports a custom click URL and a mouseover popup.
* [alternative related type field]( which uses multiple selection checkboxes instead of a single selection dropdown.
* [numeric field]( with support for measurement units suffix and/or currency symbol prefix.
* [URL field]( contains the data for a HTML <a> element.
* [pseudo field for generating a table of Magic Field names and values](
* field for WordPress's embed shortcode.
* alternative textbox field that allows you to select previously entered data.
* alternative dropdown field that allows you to enter new options directly into the dropdown.

= Search widget =
* [finds posts by Magic Fields 2 field values.](

= Miscellaneous enhancements to Magic Fields 2 =
* [Create a copy of a Magic Fields 2 custom post]( copying all of the Magic Fields' custom fields, groups and taxonomies.
* Identify and delete unreferenced files in folder files_mf.
* Provides an alternative get_audio function that outputs HTML5 audio elements for iPad and iPhone browsers.
* Provides some Magic Fields 2 utility functions for PHP programmers.

Please visit the [Toolkit's online documentation]( for more details.
**This plugin works with Magic Fields 2.3 and requires at least PHP 5.4.**

== Installation ==
1. Upload the `Magic Fields 2 Toolkit` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Open 'Settings->Magic Fields 2 Toolkit' menu item and enable specific features - all features are not enabled by default.
4. To copy a custom post open the "All Your Custom Post Type" menu item and click on "Create Copy" for the entry of the desired post.
5. To use shortcodes please see [the online documentation](
6. To use content templates please see [the online documentation](
7. Other features are self-explanatory.
8. The most current documentation is available at [Toolkit's online documentation](

== Frequently Asked Questions ==

= Does this plugin require Magic Fields 2 to be installed? =

Yes, this plugin is designed to work with Magic Fields 2 custom fields which have a non-standard implementation.

= I have installed the plugin without errors but the plugin does nothing. =

You must enable specific features - all features are not enabled by default. Open 'Settings->Magic Fields 2 Toolkit' menu item and select the features you want.

= After upgrading to version 0.4.6 the search results table of post is not sortable. =

Version 0.4.6 has a new default content macro for sortable tables. However, the toolkit will not automatically replace an existing content macro - because you may have customized it. However, you can restore the default content macro by completely erasing the content macro definition.
== Screenshots ==

== Changelog ==
= 1.1 =
* Fixes for WordPress 4.3
* Added a mt_show_tabs shortcode for displaying a list of [show_macro] shortcodes in jQuery UI tabs
* mt_show_gallery shortcode for alt_images fields now support mouse-over popups and clickable links
* Code for shortcode [mt_field] rewritten to improve software quality

= 1.0 =
* The post content template interpreter has been redesigned and rewritten.
* Video and audio media now support mouse-over popups and clickable links where applicable.
* Css for media elements and the search widget improved to be compatible with more themes.
* Added a sync button to synchronize Magic Fields 2 fields with the current toolkit fields to fix the annoying bug where the toolkit stops working after you upgrade Magic Fields 2;
* Filters moved to the namespace mf2tk to reduce global namespace pollution.
* All shortcodes are now rename-able for consistency and conflict resolution.
* Some code rewritten to improve software quality.

= =
* alt_image_field, alt_video_field, alt_audio_field, alt_embed_field and alt_numeric parameters e.g., width, height, ... can now be overridden by using corresponding show_custom_field parameters
* alt_image_field, alt_video_field, alt_audio_field and alt_embed_field now have a simplified how to use interface
* fix css alignment problems with media elements, in particular removed the bottom margin from media elements to reduce the space between media and caption
* rewrite code to improve speed, stability, security and software quality - use namespaces to reduce global pollution, gracefully handle missing parameters, use $wpdb->prepare(), ...

= =
* fix the really annoying bug where the should be optional mouseover overlay had to be specified

= =
* alt media fields now support showing popups on mouseover
* fix [problem]( Magic Fields get_data function by replacing with function alt_get_data

= 0.5.8 =
* added interactive shell for evaluating shortcodes so that you can quickly see the HTML generated by shortcode processing

= =
* variable assignments now support filters
* if statement now supports an equality condition
* added filters to return field name and field type

= 0.5.7 =
* support assigning custom field values to content template variables
* modify content template conditional inclusion to require both definition and truthy
* support iteration for content template variables

= 0.5.6 =
* content templates now support a post iterator
* fix bugs with the alt_video field type

= 0.5.5 =
* content templates now support iterators for group and field indexes

= 0.5.4 =
* added a gallery shortcode for "image media" and "alt_image" fields
* "how to use" now works for duplicated fields

= 0.5.3 =
* added support for post type specific search result templates

= 0.5.2 =
* added a URL field
* alt_image now has onclick URL property
* added how to use boxes for taxonomies
* inserting content templates can now be done directly from the post content editor - alt_template pseudo field is not necessary
* alt_table field now saves its settings

= 0.5.1 =
* save post content as a content template(content macro)
* psuedo field...