function rbs_gallery_topblock()
    {
        wp_enqueue_script('gallery-gallery-topblock', ROBO_GALLERY_URL . 'js/admin/topblock.js', array('jquery'), ROBO_GALLERY_VERSION, true);
        wp_enqueue_style('toolbox-gallery-topblock', ROBO_GALLERY_URL . 'css/admin/topblock.css', array(), ROBO_GALLERY_VERSION);
        $editNew = rbs_gallery_is_edit_page('new') || rbs_gallery_is_edit_page('edit');
        echo '<div class="rbsTopBlock rbs_getproversion_blank">
			<div class="rbsTopBig"><span class="dashicons dashicons-cart"></span>' . __('Get Pro version', 'rbs_gallery') . '</div>
			<div class="rbsTopSmall">' . __('with PRO version you get more advanced functionality and even more flexibility in settings', 'rbs_gallery') . ' </div>
		</div>';
    }
    function rbs_gallery_topblock()
    {
        wp_enqueue_script('gallery-gallery-topblock', ROBO_GALLERY_URL . 'js/admin/topblock.js', array('jquery'), ROBO_GALLERY_VERSION, true);
        wp_enqueue_style('toolbox-gallery-topblock', ROBO_GALLERY_URL . 'css/admin/topblock.css', array(), ROBO_GALLERY_VERSION);
        $editNew = rbs_gallery_is_edit_page('new') || rbs_gallery_is_edit_page('edit');
        echo '<div class="rbsTopBlock rbs_getproversion_blank">
			<div class="rbsTopBig"><span class="dashicons dashicons-cart"></span>' . __('Get Pro version', 'rbs_gallery') . '</div>
			<div class="rbsTopSmall">' . __('with PRO version you get more advanced functionality and even more flexibility in settings', 'rbs_gallery') . ' </div>
		</div>';
        if (defined('ROBO_GALLERY_SPECIAL') && ROBO_GALLERY_SPECIAL) {
            if (ROBO_GALLERY_SPECIAL == 1) {
                echo '<div class="rbsTopBlockFree rbs_getproversionfree_blank">
					<div class="rbsTopSmall"><span class="dashicons dashicons-carrot"></span> ' . __('Do You wish to get PRO version for FREE ?', 'rbs_gallery') . ' </div>
				</div>';
            }
            if (ROBO_GALLERY_SPECIAL == 2) {
                echo '<div class="rbsTopBlockFree rbs_getproversiontrans_blank">
					<div class="rbsTopSmall"><span class="dashicons dashicons-carrot"></span> ' . __('Do You wish to get PRO version for translate?', 'rbs_gallery') . ' </div>
				</div>';
            }
        }
        /*  */
    }
 function rbs_gallery_set_checkbox_default_for_new_post($default)
 {
     return rbs_gallery_is_edit_page('edit') ? '' : ($default ? (string) $default : '');
 }
if (rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST && rbs_gallery_is_edit_page('new') && !ROBO_GALLERY_PRO) {
    if (!function_exists('rbs_gallery_redirect')) {
        function rbs_gallery_redirect()
        {
            $n = 1;
            $my_wp_query = new WP_Query();
            ++$n;
            $all_wp_pages = $my_wp_query->query(array('post_type' => ROBO_GALLERY_TYPE_POST));
            if (count($all_wp_pages) >= ++$n) {
                wp_redirect("edit.php?post_type=robo_gallery_table&showproinfo=1");
            }
        }
        add_action('load-post-new.php', 'rbs_gallery_redirect');
    }
}
if (rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST && (rbs_gallery_is_edit_page('new') || rbs_gallery_is_edit_page('edit'))) {
    // Adding the Metabox class
    rbs_gallery_include('init.php', ROBO_GALLERY_CMB_PATH);
    /* Field */
    rbs_gallery_include(array('toolbox/cmb-field-toolbox.php', 'gallery/cmb-field-gallery.php', 'size/cmb-field-size.php', 'loading/cmb-field-loading.php', 'color/jw-cmb2-rgba-colorpicker.php', 'border/cmb-field-border.php', 'shadow/cmb-field-shadow.php', 'switch/cmb-field-switch.php', 'rbsselect/cmb-field-rbsselect.php', 'slider/cmb-field-slider.php', 'colums/cmb-field-colums.php', 'rbstext/cmb-field-rbstext.php', 'rbstextarea/cmb-field-rbstextarea.php', 'font/cmb-field-font.php', 'rbsgallery/cmb-field-rbsgallery.php', 'multisize/rbs-multiSize.php', 'rbsradiobutton/rbs-radiobutton.php', 'padding/rbs-padding.php'), ROBO_GALLERY_CMB_FILEDS_PATH);
    rbs_gallery_include('rbs_gallery_edit.php', ROBO_GALLERY_INCLUDES_PATH);
}
/* only backend */
if (is_admin()) {
    rbs_gallery_include(array('rbs_gallery_media.php', 'rbs_gallery_menu.php'), ROBO_GALLERY_INCLUDES_PATH);
}
/* Frontend*/
rbs_gallery_include(array('rbs_gallery_source.php', 'rbs_gallery_helper.php', 'rbs_gallery_class_utils.php', 'rbs_gallery_class.php', 'rbs_gallery_frontend.php'), ROBO_GALLERY_FRONTEND_PATH);
/* AJAX */
rbs_gallery_include('rbs_gallery_ajax.php', ROBO_GALLERY_INCLUDES_PATH);
rbs_gallery_include('rbs_create_post_ajax.php', ROBO_GALLERY_EXTENSIONS_PATH);