PHPackages                             hasanart/moco-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. hasanart/moco-framework

ActiveLibrary[Framework](/categories/framework)

hasanart/moco-framework
=======================

wordpress development framework

0.2.6(5y ago)09GPL-3.0-or-laterPHPPHP &gt;=7.0

Since Mar 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hasan-ahani/moco-framework)[ Packagist](https://packagist.org/packages/hasanart/moco-framework)[ Docs](http://wpdv.ir/moco-framework)[ RSS](/packages/hasanart-moco-framework/feed)WikiDiscussions main Synced 5d ago

READMEChangelogDependenciesVersions (4)Used By (0)

Moco Framework
==============

[](#moco-framework)

Wordpress Development Framework Theme &amp; Plugin Options

How to use
==========

[](#how-to-use)

### use with composer

[](#use-with-composer)

If you wish to use this extension in a managed environment, simply install using `composer`:

```
composer require hasanart/moco-framework

```

include vendor autoloader in function.php in theme or plugin

```
include('vendor/autoload.php');
```

### use in your theme directory

[](#use-in-your-theme-directory)

download last release and copy into your theme

```
include('moco-framework/index.php');
```

### use with install plugin

[](#use-with-install-plugin)

download last release and copy into wp-content/plugins and active plugin in plugin list

### use framework

[](#use-framework)

To use the Moco Framework

```
use MocoFramework\Helper\Controls;

//use Globa Variable
global $moco_framework;

// set your Tabs & option Controls
$options = [
    //tabs
    [
        'id'        => 'general',
        'title'     => 'General',
        'icon'      => 'fa-dashboard',
        'controls'    => [
            [
                'id'     => 'Text Control',
                'type'      => Controls::Text,
                'title'     => 'wordpress test',
                'desc'     => 'wordpress test test',
                'placeholder'     => 'wordpress ...',
                'default'     => 'wordpress ...',
                'detail'     => 'wordpress detail'
            ],
            [
                'id'        => 'js',
                'type'      => Controls::CodeEditor,
                'title'     => 'codeEditor',
            ],
            [

                'id'        => 'wp_editor',
                'type'      => Controls::WpEditor,
                'title'     => 'Wp Editor',
                'default'   => 'defaul content with support html',
            ]
        ]
    ],
    //external tab link ()
    [
        'id'        => 'external',
        'title'     => 'External',
        'icon'      => 'fa-external',
        'link'      => 'https://wpdev.ir/',
    ]
];

//make new option page
$moco_framework->option()
	->setTitle('Moco Framework Options')
	->setSubTitle('the best of options package')
	->setMenu('Moco Options')
	->setSlug('moco-options')
	->setPosition(99)
	->options($options);
```

### sub menu

[](#sub-menu)

To use the Moco Framework

```
use MocoFramework\Helper\Controls;

//use Globa Variable
global $moco_framework;

// set your Tabs & option Controls
$options = [
    //tabs
    [
        'id'        => 'general',
        'title'     => 'General',
        'icon'      => 'fa-dashboard',
        'submenu'    => [
            [
                'id'        => 'subGeneral',
                'title'     => 'Sub General',
                'icon'      => 'fa-dashboard',
                'controls'    => [
                    [
                        'id'     => 'Text Control',
                        'type'      => Controls::Text,
                        'title'     => 'wordpress test',
                        'desc'     => 'wordpress test test',
                        'placeholder'     => 'wordpress ...',
                        'default'     => 'wordpress ...',
                        'detail'     => 'wordpress detail'
                    ],
                    [
                        'id'        => 'js',
                        'type'      => Controls::CodeEditor,
                        'title'     => 'codeEditor',
                    ],
                    [

                        'id'        => 'wp_editor',
                        'type'      => Controls::WpEditor,
                        'title'     => 'Wp Editor',
                        'default'   => 'defaul content with support html',
                    ]
                ]
            ],
        ]
    ],
    //external tab link ()
    [
        'id'        => 'external',
        'title'     => 'External',
        'icon'      => 'fa-external',
        'link'      => 'https://wpdev.ir/',
    ]
];

//make new option page
$moco_framework->option()
	->setTitle('Moco Framework Options')
	->setSubTitle('the best of options package')
	->setMenu('Moco Options')
	->setSlug('moco-options')
	->setPosition(99)
	->options($options);
```

get option value
----------------

[](#get-option-value)

```
global $moco_framework;
$moco_framework->getOption('moco-options', 'logo','defautl logo url' );
```

make easy function for get yourself option
------------------------------------------

[](#make-easy-function-for-get-yourself-option)

```
function get_moco($option, $default = false){
    global $moco_framework;
    return $moco_framework->getOption('moco-options', $option, $default );
}
```

To do Features
--------------

[](#to-do-features)

- Option Page
- Metabox
- Customize Option
- Widget
- Menu Option
- Backup Options
- Update Theme Or Plugin
- License Theme Or Plugin

To do Fields
------------

[](#to-do-fields)

- Text
- Textarea
- Code Editor
- Wp Editor
- Radio
- Checkbox
- Select
- Select Media
- Switch
- Select2
- tag
- Color Picker
- Date Picker
- Draggable

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

1857d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d5f922a825178e4231a3ca5d91b123721e3847a95923b130ac78157c409397?d=identicon)[hasan-ahani](/maintainers/hasan-ahani)

---

Top Contributors

[![hasan-ahani](https://avatars.githubusercontent.com/u/67734902?v=4)](https://github.com/hasan-ahani "hasan-ahani (74 commits)")

---

Tags

frameworkwordpressoptionsthememetaboxmocowp-option

### Embed Badge

![Health badge](/badges/hasanart-moco-framework/health.svg)

```
[![Health](https://phpackages.com/badges/hasanart-moco-framework/health.svg)](https://phpackages.com/packages/hasanart-moco-framework)
```

###  Alternatives

[redux-framework/redux-framework

Build better and beautiful sites in WordPress, faster.

1.8k6.2k](/packages/redux-framework-redux-framework)[gambitph/titan-framework

Titan Framework allows theme and plugin developers to create admin pages, options, meta boxes, and theme customizer options with just a few simple lines of code.

37716.2k](/packages/gambitph-titan-framework)[themosis/theme

The Themosis framework boilerplate theme.

10449.0k3](/packages/themosis-theme)[devgeniem/dustpress

WordPress Theme Framework.

5496.8k23](/packages/devgeniem-dustpress)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

263.7k1](/packages/alleyinteractive-pest-plugin-wordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
