Plugin Directory

Changeset 1722884


Ignore:
Timestamp:
08/31/2017 07:22:05 PM (9 years ago)
Author:
anuislam
Message:

Edith readme.txt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • as-metabox/trunk/readme.txt

    r1722883 r1722884  
    8383<pre>
    8484
    85     $asmeta = new As_metabox(array(
    86             'title'         => __('Meta box demo 1', 'asm'), //MetaBox Title
    87             'id'            => 'demo-id-1',                  //MetaBox Id Please Give An Unique Id
    88             'screen'        => array('post'),                //MetaBox Post Type Example  array('post', 'page'),
    89             'context'       => 'advanced',                   //MetaBox Post Context
    90             'priority'      => 'low'                         //MetaBox Post Priority
    91         ));
     85$asmeta = new As_metabox(array(
     86        'title'         => __('Meta box demo 1', 'asm'), //MetaBox Title
     87        'id'            => 'demo-id-1',                  //MetaBox Id Please Give An Unique Id
     88        'screen'        => array('post'),                //MetaBox Post Type Example  array('post', 'page'),
     89        'context'       => 'advanced',                   //MetaBox Post Context
     90        'priority'      => 'low'                         //MetaBox Post Priority
     91    ));
    9292
    93     $asmeta->add_section(array(
    94                 'title'     =>  __('Text fields', 'asm'),
    95                 'id'        =>  'section-1',
    96                 'icon'      =>  'fa-text-width',
    97                 'fields'    =>  array(
    98                                     array(
    99                                         'id'                => 'text-field',                 //Option Id Please Give An Unique Id
    100                                         'title'             => __('Text Field', 'asm'),      //Option Id Title
    101                                         'desc'              => __('Text Field Demo', 'asm'), //Option Id Description
    102                                         'type'              => 'text',                       //Option Id Type
    103                                         'default'           => 'text',                       //Default Option Value
    104                                     )
     93$asmeta->add_section(array(
     94            'title'     =>  __('Text fields', 'asm'),
     95            'id'        =>  'section-1',
     96            'icon'      =>  'fa-text-width',
     97            'fields'    =>  array(
     98                                array(
     99                                    'id'                => 'text-field',                 //Option Id Please Give An Unique Id
     100                                    'title'             => __('Text Field', 'asm'),      //Option Id Title
     101                                    'desc'              => __('Text Field Demo', 'asm'), //Option Id Description
     102                                    'type'              => 'text',                       //Option Id Type
     103                                    'default'           => 'text',                       //Default Option Value
    105104                                )
    106105                            )
    107                         );
     106                        )
     107                    );
    108108
    109109</pre>
Note: See TracChangeset for help on using the changeset viewer.