https://github.com/erimok/uycore
A library that improve your WordPress development experience. 🚀
https://github.com/erimok/uycore
framework php php-framework php7 wordpress wordpress-development wordpress-php-library wordpress-plugin
Last synced: 3 months ago
JSON representation
A library that improve your WordPress development experience. 🚀
- Host: GitHub
- URL: https://github.com/erimok/uycore
- Owner: erimok
- License: mit
- Created: 2021-07-27T07:19:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-10T16:40:03.000Z (over 4 years ago)
- Last Synced: 2025-01-29T08:41:35.064Z (12 months ago)
- Topics: framework, php, php-framework, php7, wordpress, wordpress-development, wordpress-php-library, wordpress-plugin
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UYCore WordPress
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.
## Basics
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.
```php
\UYCore\UYCore::init();
```
## Custom Post Types
An example of default Custom Post Type registration:
```php
use UYCore\Facades\PostType;
PostType::register('faq');
```
## Custom Taxonomies
An example of default Custom Taxonomy registration:
```php
use UYCore\Facades\Taxonomy;
Taxonomy::register('faq_domain');
```
## Theme support
You are able to add WordPress theme support features via the theme support facade class.
```php
use UYCore\Facades\ThemeSupport;
ThemeSupport::getInstance()
->addTitleTag()
->addEditorStyles()
->addPostThumbnails(['post']);
```
## Security class
Security facade class allows enhancing WordPress website security.
```php
use UYCore\Facades\Security;
Security::secureAll();
```
As an alternative way, the developer is able to choose available methods in the security class to enhance security.
```php
use UYCore\Facades\Security;
Security::getInstance()
->secureApiByAuth()
->disableXmlRpc();
```
## Service classes
The library provides access to a bunch of service classes.
### Label generator service class
Label generator service class allows creating a custom array of labels for Post Type and Taxonomy by one code line.
```php
use UYCore\Services\LabelGenerator;
$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')
);
```