This is a plugin that contains a bunch of classes and functions which we use at Mint Plugins to create other plugins. Think of it as the “core” of our plugins or as a foundation.
Classes
- Widget Class – used to create widgets
- Metabox Class – used to create scaleable metaboxes
- Settings Class – used to create settings pages
- Customizer Class – used to simplify and speed up the process of creating customizer fields.
- Shortcode Insert Class – used to assemble shortcodes for the user
- Plugin Checker Class – used to check if plugin(s) have been installed
- Plugin Installer Class – used to install a plugin.
- Plugin Updater Class – used to keep plugins up to date
- Plugin Directory Class – used to show pages of installable, related plugins.
- Theme Updater Class – used to keep themes up to date
- Verify License Class – Used to verify a license code and store it.
- Font Class – used to embed google fonts
Action and Filters
- Action Reference – Docs coming soon!
- Filter Reference – Docs coming soon!
Functions
- mp_aq_resizer – used to scale images to a specific size.
- mp_core_get_all_pages() – Used to get an array of all pages.
- mp_core_get_all_post_types() – Used to get an array of all post types.
- mp_core_get_all_posts_by_type() – Used to get an array of all posts of a specific post type.
- mp_core_get_all_hierarchical_post_types() – Used to get all hierarchical post types in use.
- mp_core_get_all_terms_by_tax() – Get all Posts by a certain taxonomy
- mp_core_get_all_tax_terms() – Used to get all tax terms.
- mp_core_get_all_tags_in_cat() – Used to find tags which are attached to posts in a certain category.
Template Tags
- mp_core_the_featured_image() – This function returns the featured image of a post.
- mp_core_get_avatar() – This function returns an avatar html tag at retina size (2x).
- mp_core_get_avatar_url() – This function returns just the avatar URL without the wrapper tag.
- mp_core_oembed_get() – Get oembed and set it to be 100% width and height.
Theme Specific Functions
In order to use these functions you will need to first activate the Theme Specific Function. After you have, these functions will work.
Usable Functions:
- mp_core_link_to_menu_editor() – Fallback function for nav menus
- mp_core_categorized_blog() – Returns true if this WP has more than 1 category
Hooked-in Functions:
- mp_core_logo_customizer() – Hooked to “init”. Adds logo to Customizer.
- mp_core_category_transient_flusher() – Hooked to “edit_category” and “save_post”.
- mp_core_page_menu_args() – Hooked to “wp_page_menu_args”
- mp_core_body_classes() – Hooked to “body_class”
- mp_core_enhanced_image_navigation() – Hooked to “attachment_link”
- mp_core_wp_title() – Hooked to “wp_title”
Theme Specific Template Tags
In order to use these functions you will need to first activate the Theme Specific Function. After you have, these functions will work.
- mp_core_logo_image() – Displays the logo.
- mp_core_comments_template() – Shows the comments and comment form.
- mp_core_comment() – Callback function used in mp_core_comments_template() to display comments.
- mp_core_comment_form() – Used by mp_core_comments_template() to display the comment form.
- mp_core_paginate_links() – Shows pagination when needed.
- mp_core_page_title()
- mp_core_content_nav()
- mp_core_posted_on()