Exemplo n.º 1
0
function lb_settings()
{
    global $lookbook_settings_fields;
    ?>
        <div>

        <form method="post" action="admin.php?page=lookbook&lb_action=store_options">
            <input type="hidden" name="page_options" value="<?php 
    echo implode(',', array_keys($lookbook_settings_fields));
    ?>
" />

            <?php 
    wp_nonce_field('store_options', '_alfw_nonce');
    ?>

        <table class="wp-list-table widefat fixed striped pages">

            <tr id="row_lookbookslider_general_max_upload_filesize">
                <td class="label">
                    <label for="lookbookslider_general_max_upload_filesize"><?php 
    echo __('Uploaded file max size (bytes)');
    ?>
</label>
                </td>
                <td class="value">
                    <input type="text" class=" validate-digits required-entry input-text" value="<?php 
    echo get_option('wplb_free_max_file_size');
    ?>
" name="wplb_free_max_file_size" id="lookbookslider_general_max_upload_filesize">
                    <p class="note"><span><?php 
    echo __('Must be less then upload_max_filesize and post_max_size in php.ini');
    ?>
</span></p>
                </td>
                <td class=""></td>
            </tr>

            <tr id="row_lookbookslider_general_allowed_extensions">
                <td class="label">
                    <label for="lookbookslider_general_allowed_extensions"><?php 
    echo __('Allowed extensions');
    ?>
</label>
                </td>
                <td class="value">
                    <input type="text" class=" input-text" value="<?php 
    echo get_option('wplb_free_allow_ext');
    ?>
" name="wplb_free_allow_ext" id="lookbookslider_general_allowed_extensions">
                    <p class="note"><span><?php 
    echo __('Comma separated file extensions. Example, " jpg,gif,png "');
    ?>
</span></p>
                </td>
                <td class=""></td>
            </tr>
            <tr id="row_lookbookslider_general_interdict_areas_overlap">
                <td class="label">
                    <label for="lookbookslider_general_interdict_areas_overlap"><?php 
    echo __('Disallow hotspots areas overlap');
    ?>
</label>
                </td>
                <td class="value">
                        <?php 
    echo alfw_form_select('wplb_free_hotspots_overlap', get_option('wplb_free_hotspots_overlap'), array('0' => __('No'), '1' => __('Yes')), array('class' => 'select', 'id' => 'lookbookslider_general_interdict_areas_overlap'));
    ?>
                        <p class="note"><span><?php 
    echo __('If "Yes", will disallow hotspots areas overlap');
    ?>
</span></p>
                </td>
                <td class=""></td>
            </tr>

    <?php 
    add_slider();
    ?>
        </table>
            <div class="bottom_button">
                <?php 
    echo '<input type="submit" value="' . __('Save') . '" class="button button-primary button-large">';
    ?>
            </div>
        </form>
    <?php 
    echo '</div>';
}
Exemplo n.º 2
0
function sliders_huge_it_slider()
{
    require_once "sliders.php";
    require_once "sliders.html.php";
    if (!function_exists('print_html_nav')) {
        require_once "slider_function/html_slider_func.php";
    }
    if (isset($_GET["task"])) {
        $task = $_GET["task"];
    } else {
        $task = '';
    }
    if (isset($_GET["id"])) {
        $id = $_GET["id"];
    } else {
        $id = 0;
    }
    global $wpdb;
    switch ($task) {
        case 'add_cat':
            add_slider();
            break;
        case 'add_shortcode_post':
            add_shortcode_post();
            break;
        case 'popup_posts':
            if ($id) {
                popup_posts($id);
            }
            break;
        case 'popup_video':
            if ($id) {
                popup_video($id);
            } else {
                $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_itslider_sliders");
                popup_video($id);
            }
            break;
        case 'edit_cat':
            if ($id) {
                editslider($id);
            } else {
                $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_itslider_sliders");
                editslider($id);
            }
            break;
        case 'save':
            if ($id) {
                apply_cat($id);
            }
        case 'apply':
            if ($id) {
                apply_cat($id);
                editslider($id);
            }
            break;
        case 'remove_cat':
            removeslider($id);
            showslider();
            break;
        default:
            showslider();
            break;
    }
}
Exemplo n.º 3
0
 function add_slider_shortcode($atts)
 {
     ob_start();
     add_slider($atts[0]);
     $content = ob_get_contents();
     ob_end_clean();
     return $conotent;
 }