The main idea of the UYCore WordPress library is to decrease development time and have enjoyed the development process. The UYCore library provides a simple way to create a custom WordPress functionality in a few lines of code.
You have to run init method of UYCore class to initialize work of library features.
All calls to the library must be placed before init method of the UYCore class.
UYCoreUYCore::init();An example of default Custom Post Type registration:
use UYCoreFacadesPostType;
PostType::register('faq');An example of default Custom Taxonomy registration:
use UYCoreFacadesTaxonomy;
Taxonomy::register('faq_domain');You are able to add WordPress theme support features via the theme support facade class.
use UYCoreFacadesThemeSupport;
ThemeSupport::getInstance()
->addTitleTag()
->addEditorStyles()
->addPostThumbnails(['post']);Security facade class allows enhancing WordPress website security.
use UYCoreFacadesSecurity;
Security::secureAll();As an alternative way, the developer is able to choose available methods in the security class to enhance security.
use UYCoreFacadesSecurity;
Security::getInstance()
->secureApiByAuth()
->disableXmlRpc();The library provides access to a bunch of service classes.
Label generator service class allows creating a custom array of labels for Post Type and Taxonomy by one code line.
use UYCoreServicesLabelGenerator;
$post_type_labels = LabelGenerator::getPostTypeLabels(
esc_html__('Tip', 'domain'),
esc_html__('FAQ', 'domain')
));
$taxonomy_labels = LabelGenerator::getTaxonomyLabels(
esc_html__('Tip category', 'domain'),
esc_html__('FAQ categories', 'domain')
);