Coder Social home page Coder Social logo

bayaola / wordpruss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mystroken/wordpruss

0.0 1.0 0.0 41 KB

A reusable set of clean and "beautified" PHP classes that wrap WordPress features.

Home Page: https://mystroken.github.io/wordpruss/

License: MIT License

PHP 100.00%

wordpruss's Introduction

WordPruss

Build Status Total Downloads License

WordPruss is a reusable set of clean PHP classes that wrap WordPress functions for a fastly plugin or theme development.

Installation

It's recommended that you use Composer to install WordPruss.

$ composer require wordpruss/wordpruss "dev-master"

This will install WordPruss and all required dependencies. WordPruss requires PHP 5.6 or newer.

Usage

Here is a Basic Example of the library usage:

<?php

/*
* Suppose that we need
* to create an admin panel for our plugin.
* Let's go
*/

require __DIR__. '/vendor/autoload.php';

use \WordPruss\AdminPanel\Menu;
use \WordPruss\AdminPanel\Panel;


// Creates a new admin menu
$adminMenu = new Menu([
    'title' => 'My Plugin Name',
    'slug' => 'my_plugin_name'
]);

// Create a panel for the menu
$adminPanel = new Panel([
    'title' => 'Plugin Name - Welcome to the settings page',
    'role' => 'manage_options',
    'callback' => function() {
        echo '<h1>Hello World !</h1>';
    }
]);

$adminMenu
// Links panel to the menu
    ->setPanel($adminPanel)
// Adds the menu to WordPress admin menus list
    ->attach();

For more information on how to configure your web server, see the Documentation.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover security related issues, please email [email protected] or use the issue tracker.

License

WordPruss is an open-sourced library licensed under the MIT license. See License File for more information.

wordpruss's People

Contributors

mystroken avatar

Watchers

James Cloos avatar

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.