Example #1
0
function fa_lite_info_panel()
{
    include FA_dir('displays/panel_cf_info.php');
}
Example #2
0
<?php

/**
 * @package Featured articles Lite - Wordpress plugin
 * @author CodeFlavors ( codeflavors[at]codeflavors.com )
 * @version 2.4
 */
// wp class extension to display tables
require_once FA_dir('includes/custom_wp_list_table.php');
$sliders_table = new FA_List_Table(array('singular' => 'slider', 'plural' => 'sliders'));
// set columns to be displayed
$columns = array('cb' => '<input type="checkbox" />', 'post_title' => __('Title', 'falite'), 'ID' => __('Slider ID', 'falite'), 'post_author' => __('Author', 'falite'), 'post_date' => __('Date', 'falite'));
$sliders_table->columns = $columns;
// set sortable columns
$sortable_columns = array('post_title' => array('post_title', false), 'post_author' => array('post_author', false), 'post_date' => array('post_date', true));
// set delete and edit pages
$sliders_table->edit_page = 'featured-articles-lite';
$sliders_table->post_type = 'fa_slider';
$sliders_table->sortable_columns = $sortable_columns;
// get the records from DB
$sliders_table->prepare_items();
?>
<div class="wrap">
	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
	<h2>Featured Articles Sliders <a class="button add-new-h2" href="<?php 
menu_page_url('featured-articles-lite-new-slideshow');
?>
"><?php 
_e('Add New', 'falite');
?>
</a> </h2>
Example #3
0
<?php

/**
 * @package Featured articles Lite - Wordpress plugin
 * @author CodeFlavors ( http://www.codeflavors.com )
 * @version 2.4
 */
include FA_dir('includes/custom_wp_list_table.php');
$sliders_table = new FA_List_Table(array('singular' => 'slider', 'plural' => 'sliders'));
// set columns to be displayed
$columns = array('post_title_s' => __('Title', 'falite'), 'ID' => __('Slider ID', 'falite'), 'slider_content' => __('Content', 'falite'), 'slider_theme' => __('Slider theme', 'falite'));
$sliders_table->columns = $columns;
$sliders_table->per_page = 13;
// set sortable columns
$sortable_columns = array('post_title' => array('post_title', false), 'post_author' => array('post_author', false), 'post_date' => array('post_date', true));
// set delete and edit pages
$sliders_table->edit_page = 'featured-articles-pro';
$sliders_table->bulk_actions = false;
$sliders_table->sortable_columns = $sortable_columns;
// get the records from DB
$sliders_table->prepare_items('fa_slider');
// styling and scripts
wp_enqueue_style('FA_add_content', FA_path('styles/add_content_modal.css'));
wp_enqueue_script('FA_sliders_shortcode', FA_path('scripts/admin/admin_shortcode.js'), array('jquery'));
// output iframe header
iframe_header(__('Slideshows', 'falite'));
?>
<div class="wrap">
	<div class="icon32 icon32-posts-page" id="icon-edit"><br></div>
    <h2><?php 
_e('Select slideshow', 'falite');
Example #4
0
/**
 * FA themes folder can be changed from plugin administration. This solves the problem with the themes being deleted on plugin update.
 * Theme folder must be located inside wp content folder, where default plugins and themes folders from Wordpress are.
 * 
 * Use either FA_themes_path() or FA_themes_url() to retrieve folder path information.
 * 
 * @param bool $full_path -  return a full path (true) or just the path from inside wp content folder(false)
 * @param bool $echo - return the path (false) or echo it(true)
 * @param bool $return_url - return url instead of path
 * @return path to FA themes folder
 * 
 * @since 2.4.1
 */
function FA_get_themes_folder($full_path = true, $echo = false, $return_url = false)
{
    // plugin option set on activation.
    $plugin_options = get_option('fa_plugin_details', array());
    // if themes folder path is in plugin options, let's use it
    if (array_key_exists('themes_folder', $plugin_options)) {
        // small problem with themes folder settings being set wrong. Correct it if it's the case.
        if (strstr($plugin_options['themes_folder'], 'featured-articles-pro')) {
            $plugin_options['themes_folder'] = str_replace('featured-articles-pro', 'featured-articles-lite', $plugin_options['themes_folder']);
        }
        if (!$full_path) {
            $path = $plugin_options['themes_folder'];
        } else {
            $path = ($return_url ? WP_CONTENT_URL : WP_CONTENT_DIR) . '/' . $plugin_options['themes_folder'];
        }
    } else {
        // the default path is inside plugin folder
        $path = $return_url ? FA_path('themes') : FA_dir('themes');
        if (!$full_path) {
            $remove = $return_url ? WP_CONTENT_URL : WP_CONTENT_DIR;
            $path = str_replace($remove . '/', '', $path);
        }
    }
    if ($echo) {
        echo $path;
    } else {
        return $path;
    }
}
Example #5
0
<?php

/**
 * @package Featured articles Lite - Wordpress plugin
 * @author CodeFlavors ( codeflavors[at]codeflavors.com )
 * @version 2.4
 */
include FA_dir('includes/custom_wp_posts_table.php');
// get already selected pages
$slider_id = isset($_GET['id']) ? (int) $_GET['id'] : false;
$options = FA_slider_options($slider_id);
wp_enqueue_style('FA_add_content', FA_path('styles/add_content_modal.css'));
wp_enqueue_script('FA_content_add_script', FA_path('scripts/admin_content_add_modal.js'), array('jquery'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php 
do_action('admin_xml_ns');
?>
 <?php 
language_attributes();
?>
>
<head>
<meta http-equiv="Content-Type" content="<?php 
bloginfo('html_type');
?>
; charset=<?php 
echo get_option('blog_charset');
?>
" />
<title><?php 
Example #6
0
<?php

/**
 * @package Featured articles Lite - Wordpress plugin
 * @author CodeFlavors ( http://www.codeflavors.com )
 * @version 2.4
 */
include FA_dir('includes/class-fa-categories-list-table.php');
$categories_table = new FA_Categories_List_Table();
// get the records from DB
$categories_table->prepare_items();
// styling and scripts
wp_enqueue_style('FA_add_content', FA_path('styles/add_content_modal.css'));
wp_enqueue_script('FA_content_add_script', FA_path('scripts/admin/display_control_modal.js'), array('jquery'));
// output iframe header
iframe_header(__('Categories', 'falite'));
?>
<div class="wrap">
	<div class="icon32 icon32-posts-page" id="icon-edit"><br></div>
    <h2><?php 
_e('Select categories', 'falite');
?>
</h2>
    <?php 
$categories_table->views();
?>
    <?php 
$categories_table->display();
?>
    <input class="button-primary" value="<?php 
_e('Close window', '');