* @var string
     */
    public $priority = 'core';
    /**
     * The part of the page where the edit screen section should be shown ('normal', 'advanced', or 'side'). 
     * 
     * @link http://codex.wordpress.org/Function_Reference/add_meta_box
     * Inherited from the class FactoryMetabox.
     * 
     * @since 1.0.0
     * @var string
     */
    public $context = 'side';
    public function __construct($plugin)
    {
        parent::__construct($plugin);
        $this->title = __('Terms & Policies', 'bizpanda');
    }
    public $cssClass = 'factory-bootstrap-329';
    public function html()
    {
        ?>
            <?php 
        printf(__('You can change the Terms & Policies options on <a href="%s" target="_blank">this page</a>.'), admin_url('admin.php?page=settings-' . $this->plugin->pluginName . '&opanda_screen=terms&action=index'));
        ?>
        <?php 
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_TermsPrivacyMetaBox', $bizpanda);
        $interval = isset($_POST[$this->scope . '_relock_interval']) ? intval($_POST[$this->scope . '_relock_interval']) : 0;
        if ($interval < 0) {
            $interval = 0;
        }
        $units = isset($_POST[$this->scope . '_relock_interval_units']) ? $_POST[$this->scope . '_relock_interval_units'] : null;
        if (!$units || !in_array($units, array('days', 'hours', 'minute'))) {
            $units = 'days';
        }
        if (!$interval) {
            $_POST[$this->scope . '_relock'] = null;
        }
        if (!$delay) {
            $interval = 0;
            $units = 'days';
        }
        $intervalInMinutes = $interval;
        if ($units == 'days') {
            $intervalInMinutes = 24 * 60 * $interval;
        }
        if ($units == 'hours') {
            $intervalInMinutes = 60 * $interval;
        }
        $this->provider->setValue('relock_interval_in_seconds', $intervalInMinutes * 60);
        $this->provider->setValue('relock_interval', $interval);
        $this->provider->setValue('relock_interval_units', $units);
        do_action('onp_sl_visability_options_on_save', $this);
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_VisabilityOptionsMetaBox', $bizpanda);
     * 
     * @return void
     */
    public function html()
    {
        global $post;
        $isSystem = get_post_meta($post->ID, 'opanda_is_system', true);
        $item = OPanda_Items::getCurrentItem();
        $shortcodeName = $item['shortcode'];
        $shortcode = '[' . $shortcodeName . '] [/' . $shortcodeName . ']';
        if (!$isSystem) {
            $shortcode = '[' . $shortcodeName . ' id="' . $post->ID . '"] [/' . $shortcodeName . ']';
        }
        ?>
        <div class="factory-bootstrap-329 factory-fontawesome-320">
           <p class="onp-sl-description-section">
               <?php 
        _e('Wrap content you want to lock via the following shortcode in your post editor:', 'bizpanda');
        ?>
               <input class="onp-sl-shortcode" type="text" value='<?php 
        echo $shortcode;
        ?>
' />
           </p>
        </div>
        <?php 
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_ManualLockingMetaBox', $bizpanda);
예제 #4
0
        <p class="note"><strong><?php 
        _e('Note', 'bizpanda');
        ?>
:</strong> <?php 
        _e('In the preview mode, some features of the locker may not work properly.', 'bizpanda');
        ?>
</p>
        <div id="lock-preview-wrap"<?php 
        echo $dataPrint;
        ?>
>
            <iframe 
                allowtransparency="1" 
                frameborder="0" 
                hspace="0" 
                marginheight="0"
                marginwidth="0"
                name="preview"
                vspace="0"
                width="100%">
                <?php 
        _e('Your browser doen\'t support the iframe tag.', 'bizpanda');
        ?>
            </iframe>           
        </div>
        <?php 
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_PreviewMetaBox', $bizpanda);
            ?>
            <div class="sl-footer">
                <?php 
            echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Get Premium for $24<br /><span>(it will take a pair of minutes)</span></a>', 'signinlocker'), onp_licensing_325_get_purchase_url($sociallocker, 'more-features'), onp_licensing_325_manager_link($sociallocker->pluginName, 'activateTrial', false));
            ?>
            </div>
        <?php 
        } else {
            ?>
            <div class="sl-footer">
                <?php 
            echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Try 7-days Trial Version<br /><span>(activate by one click)</span></a><a href="%s" class="sl-buy"> or <strong>buy</strong> the full premium version now!</a>', 'signinlocker'), onp_licensing_325_manager_link($sociallocker->pluginName, 'activateTrial', false), onp_licensing_325_get_purchase_url($sociallocker, 'more-features'));
            ?>
            </div>
        <?php 
        }
        ?>
        
        <div style="display: none">
            <div class="demo-social-options"></div>
            <div class="demo-themes"></div>
            <div class="demo-blurring-effect"></div>   
            <div class="demo-advanced-options"></div>
        </div>
        
        </div>
    <?php 
    }
}
FactoryMetaboxes321::register('OPanda_SigninLockerMoreFeaturesMetaBox', $bizpanda);
     * 
     * @since 1.0.0
     * @param type $postId
     */
    public function onSavingForm($postId)
    {
        if (!OPanda_Items::isCurrentFree()) {
            return;
        }
        $overlap = isset($_POST['opanda_overlap']) ? $_POST['opanda_overlap'] : null;
        if ($overlap == 'blurring') {
            $_POST['opanda_overlap'] = 'transparence';
        }
    }
    public function showOtherFrontendTextNote()
    {
        ?>
        <div class="form-group opanda-edit-common-text">
            <label class="col-sm-2 control-label"></label>
            <div class="control-group controls col-sm-10">
                <?php 
        printf(__('<a href="%s" target="_blank">Click here</a> to edit the front-end text shared for all lockers.', 'bizpanda'), opanda_get_settings_url('text'));
        ?>
            </div>
        </div>
        <?php 
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_BasicOptionsMetaBox', $bizpanda);
     * @var string
     */
    public $context = 'side';
    public function __construct($plugin)
    {
        parent::__construct($plugin);
        $this->title = __('Advanced Options', 'bizpanda');
    }
    public $cssClass = 'factory-bootstrap-329';
    /**
     * Configures a form that will be inside the metabox.
     * 
     * @see FactoryMetaboxes321_FormMetabox
     * @since 1.0.0
     * 
     * @param FactoryForms328_Form $form A form object to configure.
     * @return void
     */
    public function form($form)
    {
        $options = array(array('type' => 'checkbox', 'way' => 'buttons', 'name' => 'close', 'title' => __('Close Icon', 'bizpanda'), 'hint' => __('Shows the Close Icon at the corner.', 'bizpanda'), 'icon' => OPANDA_BIZPANDA_URL . '/assets/admin/img/close-icon.png', 'default' => false), array('type' => 'textbox', 'name' => 'timer', 'title' => __('Timer Interval', 'bizpanda'), 'hint' => __('Sets a countdown interval for the locker.', 'bizpanda'), 'icon' => OPANDA_BIZPANDA_URL . '/assets/admin/img/timer-icon.png', 'default' => false), array('type' => 'checkbox', 'way' => 'buttons', 'name' => 'ajax', 'title' => __('AJAX', 'bizpanda'), 'hint' => __('If On, locked content will be cut from a page source code.', 'bizpanda'), 'icon' => OPANDA_BIZPANDA_URL . '/assets/admin/img/ajax-icon.png', 'default' => false), array('type' => 'html', 'html' => '<div id="opanda-ajax-disabled" class="alert alert-warning">The option AJAX is not applied when the "transparence" or "blurring" overlap modes selected.</div>'), array('type' => 'checkbox', 'way' => 'buttons', 'name' => 'highlight', 'title' => __('Highlight', 'bizpanda'), 'hint' => __('Defines whether the locker must use the Highlight effect.', 'bizpanda'), 'icon' => OPANDA_BIZPANDA_URL . '/assets/admin/img/highlight-icon.png', 'default' => true));
        if (OPanda_Items::isCurrentFree()) {
            $options[] = array('type' => 'html', 'html' => '<div style="display: none;" class="factory-fontawesome-320 opanda-overlay-note opanda-premium-note">' . __('<i class="fa fa-star-o"></i> Go Premium <i class="fa fa-star-o"></i><br />To Unlock These Features <a href="#" class="opnada-button">Learn More</a>', 'bizpanda') . '</div>');
        }
        $options = apply_filters('opanda_advanced_options', $options);
        $form->add($options);
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_AdvancedOptionsMetaBox', $bizpanda);
            <div class="sl-footer">
                <?php 
            echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Try 7-days Trial Version<br /><span>(activate by one click)</span></a><a href="%s" class="sl-buy"> or <strong>buy</strong> the full premium version now!</a>', 'bizpanda'), onp_licensing_325_manager_link($optinpanda->pluginName, 'activateTrial', false), onp_licensing_325_get_purchase_url($optinpanda));
            ?>
            </div>
        <?php 
        } else {
            ?>
            <div class="sl-footer">
                <?php 
            echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Get Premium for $24<br /><span>(it will take a pair of minutes)</span></a>', 'bizpanda'), onp_licensing_325_get_purchase_url($optinpanda), onp_licensing_325_manager_link($optinpanda->pluginName, 'activateTrial', false));
            ?>
            </div>
        <?php 
        }
        ?>
        
        <div style="display: none">
            <div class="demo-social-options"></div>
            <div class="demo-themes"></div>
            <div class="demo-blurring-effect"></div>   
            <div class="demo-advanced-options"></div>
        </div>
        
        </div>
    <?php 
    }
}
global $bizpanda;
FactoryMetaboxes321::register('OPanda_MoreFeaturesMetaBox', $bizpanda);
예제 #9
0
/**
 * Registers default options (lockers, popups, forms).
 * 
 * @since 1.0.0
 */
function opanda_add_meta_boxes()
{
    global $bizpanda;
    $type = OPanda_Items::getCurrentItem();
    if (empty($type)) {
        return;
    }
    $typeName = $type['name'];
    $data = array();
    if (OPanda_Items::isCurrentPremium()) {
        $data[] = array('class' => 'OPanda_BasicOptionsMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/basic-options.php');
        $data[] = array('class' => 'OPanda_PreviewMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/preview.php');
        $data[] = array('class' => 'OPanda_ManualLockingMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/manual-locking.php');
        $data[] = array('class' => 'OPanda_BulkLockingMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/bulk-locking.php');
        $data[] = array('class' => 'OPanda_VisabilityOptionsMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/visability-options.php');
        $data[] = array('class' => 'OPanda_AdvancedOptionsMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/advanced-options.php');
    } else {
        $data[] = array('class' => 'OPanda_BasicOptionsMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/basic-options.php');
        $data[] = array('class' => 'OPanda_PreviewMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/preview.php');
        $data[] = array('class' => 'OPanda_ManualLockingMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/manual-locking.php');
        $data[] = array('class' => 'OPanda_BulkLockingMetaBox', 'path' => OPANDA_BIZPANDA_DIR . '/includes/metaboxes/bulk-locking.php');
    }
    $data = apply_filters("opanda_item_type_metaboxes", $data, $typeName);
    $data = apply_filters("opanda_{$typeName}_type_metaboxes", $data);
    foreach ($data as $metabox) {
        require_once $metabox['path'];
        FactoryMetaboxes321::registerFor(new $metabox['class']($bizpanda), OPANDA_POST_TYPE, $bizpanda);
    }
}
        ?>
" target="_blank"><?php 
        _e('change', 'signinlocker');
        ?>
</a>).
            </div>
        </div>
        <?php 
    }
    /**
     * Removes the action 'lead' from options of the buttons because it's a virtual action.
     */
    public function onSavingForm($postId)
    {
        $buttons = array('facebook', 'twitter', 'google', 'linkedin', 'email');
        foreach ($buttons as $buttonName) {
            $strActions = isset($_POST['opanda_' . $buttonName . '_actions']) ? $_POST['opanda_' . $buttonName . '_actions'] : '';
            $rawActions = explode(',', $strActions);
            $filteredActions = array();
            foreach ($rawActions as $action) {
                if ('lead' == $action) {
                    continue;
                }
                $filteredActions[] = $action;
            }
            $_POST['opanda_' . $buttonName . '_actions'] = implode(',', $filteredActions);
        }
    }
}
FactoryMetaboxes321::register('OPanda_ConnectOptionsMetaBox', $bizpanda);
        $tabs['items'][] = array('type' => 'tab-item', 'name' => 'facebook-share', 'items' => array(array('off' => !(empty($facebookAppId) || $facebookAppId == '117100935120196'), 'type' => 'html', 'html' => '<div class="alert alert-warning">' . sprintf(__('Please make sure that you <a href="%s">set a facebook app id</a> for your domain, otherwise the button will not work. The Facebook Share button requires an app id registered for a domain where it\'s used.', 'sociallocker'), opanda_get_settings_url('social')) . '</div>'), array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Available', 'sociallocker'), 'hint' => __('Set On, to activate the button.', 'sociallocker'), 'name' => 'facebook-share_available', 'default' => false), array('type' => 'url', 'title' => __('URL to share', 'sociallocker'), 'hint' => __('Set an URL which the user has to share in order to unlock your content. Leave this field empty to use an URL of the page where the locker will be located.', 'sociallocker'), 'name' => 'facebook_share_url'), array('type' => 'textbox', 'title' => __('Button Title', 'sociallocker'), 'hint' => __('Optional. A title of the button that is situated on the covers in the themes "Secrets" and "Flat".', 'sociallocker'), 'name' => 'facebook_share_title', 'default' => __('share', 'sociallocker')), array('type' => 'more-link', 'name' => 'share-button-options', 'title' => __('Show more options', 'sociallocker'), 'count' => 5, 'items' => array(array('type' => 'form-group', 'id' => 'opanda-facebook-share-vs-feed', 'title' => __('Feed Dialog Or Share Dialog', 'sociallocker'), 'hint' => __('By default the plugin uses the Facebook <a href="https://developers.facebook.com/docs/sharing/reference/feed-dialog/" target="_blank">Feed Dialog</a>. But some users believe that posts published via the Facebook <a href="https://developers.facebook.com/docs/sharing/reference/share-dialog" target="_blank">Share Dialog</a> appear more often on the top of the news feeds and this way bring more traffic.  Both the dialogue perform the same action (sharing) and look approximately equally.', 'sociallocker'), 'items' => array(array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Use Facebook Share Dialog', 'sociallocker'), 'hint' => __('Optional. Set On to use the Facebook Share Dialog instead of the Facebook Feed Dialog. Use the <A href="http://davidwalsh.name/facebook-meta-tags" target="_blank">Open Graph Meta Tags</a> to specify the message to share for the Share Dialog.', 'sociallocker'), 'name' => 'facebook_share_dialog', 'default' => false))), array('type' => 'form-group', 'id' => 'opanda-facebook-message-to-share', 'title' => __('Message To Share', 'sociallocker'), 'hint' => __('By default the message is extracted from the page content (from the <A href="http://davidwalsh.name/facebook-meta-tags" target="_blank">Open Graph Meta Tags</a>). But for the Feed Dialog you can set an own message.', 'sociallocker'), 'items' => array(array('type' => 'textbox', 'title' => __('Name', 'sociallocker'), 'hint' => __('Optional. The name of the link attachment.', 'sociallocker'), 'name' => 'facebook_share_message_name'), array('type' => 'textbox', 'title' => __('Caption', 'sociallocker'), 'hint' => __('Optional. The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.', 'sociallocker'), 'name' => 'facebook_share_message_caption'), array('type' => 'textbox', 'title' => __('Description', 'sociallocker'), 'hint' => __('Optional. The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.', 'sociallocker'), 'name' => 'facebook_share_message_description'), array('type' => 'textbox', 'title' => __('Image', 'sociallocker'), 'hint' => __('Optional. The URL of a picture attached to this post. The picture must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1.', 'sociallocker'), 'name' => 'facebook_share_message_image')))))));
        // - Twitter Follow Tab
        $tabs['items'][] = array('type' => 'tab-item', 'name' => 'twitter-follow', 'items' => array(array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Available', 'sociallocker'), 'hint' => __('Set On, to activate the button.', 'sociallocker'), 'name' => 'twitter-follow_available', 'default' => false), array('type' => 'url', 'title' => __('User to Follow', 'sociallocker'), 'hint' => __('Set an URL of your Twitter profile (for example, <a href="https://twitter.com/byonepress" target="_blank">https://twitter.com/byonepress</a>).', 'sociallocker'), 'name' => 'twitter_follow_url'), array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Hide Username', 'sociallocker'), 'hint' => __('Set On to hide your username on the button (makes the button shorter).', 'sociallocker'), 'name' => 'twitter_follow_hide_name'), array('type' => 'textbox', 'title' => __('Button Title', 'sociallocker'), 'hint' => __('Optional. A title of the button that is situated on the covers in the themes "Secrets" and "Flat".', 'sociallocker'), 'name' => 'twitter_follow_title', 'default' => __('follow us', 'sociallocker'))));
        // - Google Share Tab
        $tabs['items'][] = array('type' => 'tab-item', 'name' => 'google-share', 'items' => array(array('type' => 'html', 'html' => '<div class="alert alert-warning">' . __('<strong>Warning!</strong> The Google Share button will not appear on mobile devices because it\'s not possible to catch the moment when the mobile user clicks on the button. Also please pay attention the plugin cannot track whether the user shared actually or not. If the user closes the Share Dialog without sharing, the content will be unlocked.', 'sociallocker') . '</div>'), array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Available', 'sociallocker'), 'hint' => __('Set On, to activate the button.', 'sociallocker'), 'name' => 'google-share_available'), array('type' => 'url', 'title' => __('URL to share', 'sociallocker'), 'hint' => __('Set an URL which the user has to share in order to unlock your content. Leave this field empty to use an URL of the page where the locker will be located.', 'sociallocker'), 'name' => 'google_share_url'), array('type' => 'textbox', 'title' => __('Button Title', 'sociallocker'), 'hint' => __('Optional. A title of the button that is situated on the covers in the themes "Secrets" and "Flat".', 'sociallocker'), 'name' => 'google_share_title', 'default' => __('share', 'sociallocker'))));
        // - YouTube Subscribe
        // if the user has not set the cliend id, show a notice
        $googleClientId = get_option('opanda_google_client_id', false);
        $tabs['items'][] = array('type' => 'tab-item', 'name' => 'youtube-subscribe', 'items' => array(array('off' => !empty($googleClientId), 'type' => 'html', 'html' => '<div class="alert alert-warning">' . sprintf(__(' The YouTube Button requires the Google Client ID linked to your domain. Before using the button, please <a href="%s" target="_blank">set the Client ID</a>.', 'sociallocker'), opanda_get_settings_url('social')) . '</div>'), array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Available', 'sociallocker'), 'hint' => __('Set On, to activate the button.', 'sociallocker'), 'name' => 'youtube-subscribe_available', 'default' => false), array('type' => 'textbox', 'title' => __('Channel ID', 'sociallocker'), 'hint' => __('Set a channel ID to subscribe (for example, <a href="http://www.youtube.com/channel/UCANLZYMidaCbLQFWXBC95Jg" target="_blank">UCANLZYMidaCbLQFWXBC95Jg</a>).', 'sociallocker'), 'name' => 'google_youtube_channel_id'), array('type' => 'textbox', 'title' => __('Button Title', 'sociallocker'), 'hint' => __('Optional. A visible title of the buttons that is used in some themes (by default only in the Secrets theme).', 'sociallocker'), 'name' => 'google_youtube_title', 'default' => __('Youtube', 'sociallocker'))));
        // - LinkedIn Share Tab
        $tabs['items'][] = array('type' => 'tab-item', 'name' => 'linkedin-share', 'items' => array(array('type' => 'checkbox', 'way' => 'buttons', 'title' => __('Available', 'sociallocker'), 'hint' => __('Set On, to activate the button.', 'sociallocker'), 'name' => 'linkedin-share_available', 'default' => false), array('type' => 'url', 'title' => __('URL to share', 'sociallocker'), 'hint' => __('Set an URL which the user has to share in order to unlock your content. Leave this field empty to use an URL of the page where the locker will be located.', 'sociallocker'), 'name' => 'linkedin_share_url'), array('type' => 'textbox', 'title' => __('Button Title', 'sociallocker'), 'hint' => __('Optional. A title of the button that is situated on the covers in the themes "Secrets" and "Flat".', 'sociallocker'), 'name' => 'linkedin_share_title', 'default' => __('share', 'sociallocker'))));
        $tabs = apply_filters('onp_sl_social_options', $tabs);
        $defaultOrder = array();
        if ($vkIsActiveByDefault) {
            $defaultOrder[] = 'vk-like';
        }
        if ($facebookIsActiveByDefault) {
            $defaultOrder[] = 'facebook-like';
        }
        if ($twitterActiveByDefault) {
            $defaultOrder[] = 'twitter-tweet';
        }
        if ($googleIsActiveByDefault) {
            $defaultOrder[] = 'google-plus';
        }
        $form->add(array(array('type' => 'checkbox', 'way' => 'buttons', 'name' => 'show_counters', 'title' => __('Show counters', 'sociallocker'), 'default' => true), array('type' => 'html', 'html' => '<div class="onp-sl-metabox-hint">
                                <strong>' . __('Hint', 'sociallocker') . '</strong>: ' . __('Drag and drop the tabs to change the order of the buttons.', 'sociallocker') . '</div>'), array('type' => 'hidden', 'name' => 'buttons_order', 'default' => implode(',', $defaultOrder)), $tabs));
    }
}
FactoryMetaboxes321::register('OPanda_SocialOptionsMetaBox', $bizpanda);
예제 #12
0
 /**
  * Registers the custom post type for the admin area.
  * 
  * @since 1.0.0
  * @return void
  */
 public function registerForAdmin()
 {
     $this->buildLables();
     $this->buildMessages();
     $metaboxes = array();
     $this->configure();
     // adds metaboxes that needed to load
     foreach ($this->metaboxes as $metabox) {
         FactoryMetaboxes321::registerFor($metabox, $this->name, $this->plugin);
     }
     if (!$this->scripts->isEmpty('bootstrap') || !$this->styles->isEmpty('bootstrap')) {
         add_action('factory_bootstrap_enqueue_scripts_' . $this->plugin->pluginName, array($this, 'actionAdminBootstrapScripts'));
     }
     // includes styles and scripts
     if (!$this->scripts->isEmpty() || !$this->styles->isEmpty()) {
         add_action('admin_enqueue_scripts', array($this, 'actionAdminScripts'));
     }
     // updates messages thats displays during changes
     add_filter('post_updated_messages', array($this, 'actionUpdatedMessages'));
     // redefines the Publish metabox for non-public types
     if ($this->template !== 'public') {
         //FactoryMetaboxes321::registerFor('FactoryMetaboxes321_PublishMetabox', $this->name);
         add_action('add_meta_boxes', array($this, 'actionAddMetaboxs'));
     }
     if (!empty($this->capabilities)) {
         $this->options['capability_type'] = $this->name;
         $this->options['capabilities'] = array('edit_post' => 'edit_' . $this->name, 'read_post' => 'read_' . $this->name, 'delete_post' => 'delete_' . $this->name, 'delete_posts' => 'delete_' . $this->name . 's', 'edit_posts' => 'edit_' . $this->name . 's', 'edit_others_posts' => 'edit_others_' . $this->name . 's', 'publish_posts' => 'publish_' . $this->name . 's', 'read_private_posts' => 'read_private_' . $this->name . 's', 'create_posts' => 'edit_' . $this->name . 's');
     } elseif ($this->options['capability_type'] == null) {
         $this->options['capability_type'] = 'post';
     }
     // register view table
     if (!empty($this->viewTable) && class_exists($this->viewTable)) {
         $this->viewTable = new $this->viewTable($this->plugin);
         $this->viewTable->connect($this);
     }
     // sets menu icon
     if (!empty($this->menu)) {
         add_action('admin_head', array($this, 'actionAdminHead'));
         if (!empty($this->menu->title)) {
             add_action('admin_menu', array($this, 'actionAdminMenu'));
         }
     }
     register_post_type($this->name, $this->options);
 }