function rbs_gallery_group_metabox() { function rbs_gallery_set_checkbox_default_for_new_post($default) { return rbs_gallery_is_edit_page('edit') ? '' : ($default ? (string) $default : ''); } if (rbs_gallery_is_edit_page('edit')) { rbs_gallery_include('rbs_gallery_options_copy.php', ROBO_GALLERY_OPTIONS_PATH); } rbs_gallery_include('rbs_gallery_options_images.php', ROBO_GALLERY_OPTIONS_PATH); if (rbs_gallery_is_edit_page('edit')) { rbs_gallery_include(array('rbs_gallery_options_shortcode.php', 'rbs_gallery_options_tools.php'), ROBO_GALLERY_OPTIONS_PATH); } rbs_gallery_include(array('rbs_gallery_options_text.php', 'rbs_gallery_options_size.php', 'rbs_gallery_options_view.php', 'rbs_gallery_options_hover.php', 'rbs_gallery_options_button.php'), ROBO_GALLERY_OPTIONS_PATH); if (!ROBO_GALLERY_PRO) { rbs_gallery_include('rbs_gallery_options_infowide.php', ROBO_GALLERY_OPTIONS_PATH); } rbs_gallery_include(array('rbs_gallery_options_loading.php', 'rbs_gallery_options_polaroid.php', 'rbs_gallery_options_lightbox.php'), ROBO_GALLERY_OPTIONS_PATH); if (!ROBO_GALLERY_PRO) { rbs_gallery_include('rbs_gallery_options_info.php', ROBO_GALLERY_OPTIONS_PATH); } if (rbs_gallery_is_edit_page('edit')) { rbs_gallery_include('rbs_create_post.php', ROBO_GALLERY_EXTENSIONS_PATH); } }
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);
<?php if (!defined('WPINC')) { die; } rbs_gallery_include('class.postcontroller.php', ROBO_GALLERY_EXTENSIONS_PATH); if (!function_exists('rbs_ajax_create_article_form')) { function rbs_ajax_create_article_form() { $args = array('show_option_all' => '', 'show_option_none' => '', 'option_none_value' => '-1', 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 0, 'hide_empty' => 0, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 1, 'name' => 'cat', 'id' => 'rbs_post_create_category', 'class' => 'form-control', 'depth' => 0, 'tab_index' => 0, 'taxonomy' => 'category', 'hide_if_empty' => false, 'value_field' => 'term_id'); if (!isset($_POST['galleryid']) || !(int) $_POST['galleryid']) { echo '<p><strong>' . __('Post not created. Error: ', 'rbs_gallery') . '</strong><br><p>' . __('Empty gallery ID', 'rbs_gallery') . '</p>'; return; } $post_info = get_post((int) $_POST['galleryid']); if (gettype($post_info) != 'object') { echo '<p><strong>' . __('Post not created. Error: ', 'rbs_gallery') . '</strong><br><p>' . __('Incorrect gallery ID', 'rbs_gallery') . '</p>'; return; } echo "<h3>" . __('Add new post', 'rbs_gallery') . "</h3>"; ?> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="rbs_post_create_category"><?php _e('Category', 'rbs_gallery'); ?> :</label></th> <td><?php wp_dropdown_categories($args); ?>
function robo_gallery_about_submenu_page_render() { rbs_gallery_include('rbs_gallery_about.php', ROBO_GALLERY_INCLUDES_PATH); }
rbs_gallery_include('rbs_gallery_topblock.php', ROBO_GALLERY_INCLUDES_PATH); } 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'), 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);