Code Monkey home page Code Monkey logo

uycore's Introduction

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.

\UYCore\UYCore::init();

Custom Post Types

An example of default Custom Post Type registration:

use UYCore\Facades\PostType;

PostType::register('faq');

Custom Taxonomies

An example of default Custom Taxonomy registration:

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.

use UYCore\Facades\ThemeSupport;

ThemeSupport::getInstance()
    ->addTitleTag()
    ->addEditorStyles()
    ->addPostThumbnails(['post']);

Security class

Security facade class allows enhancing WordPress website security.

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.

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.

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')
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.