/*
Plugin Name: Launchpad
Plugin URI: http://cysy.com
Description: Adds a custom theme options page for the CYSY framework.
Version: 1.0
Author: Cheyne Sutherland
Author URI: http://cysy.com
*/
/*-----------------------------------------------------------------------------------
LOAD JQUERY, OTHER PLUGIN ASSETS, & SAVED OPTIONS
-------------------------------------------------------------------------------------*/
// GET REGISTERED JQUERY
function launchpad_get_jquery() {
wp_enqueue_script('jquery');
}
add_action('init', 'launchpad_get_jquery');
// DEFINE PLUGIN FILE PATH
define('LAUNCHPAD_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__)) . '/');
function launchpad_register_scripts()
{
// LOAD LIGHTSLIDER JAVASCRIPT FILE
wp_enqueue_script('lightslider', LAUNCHPAD_PLUGIN_PATH.'js/lightslider.js', array('jquery'));
// LOAD PLUGIN JAVASCRIPT FILE
wp_enqueue_script('launchpad-scripts', LAUNCHPAD_PLUGIN_PATH.'js/launchpad.js', array('jquery'));
// LOAD PLUGIN STYLESHEET
wp_enqueue_style('launchpad-styles', LAUNCHPAD_PLUGIN_PATH.'css/style.css');
// LOAD OLYMPUS STYLESHEET
wp_enqueue_style('olympus-styles', LAUNCHPAD_PLUGIN_PATH.'css/olympus.css');
// LOAD LIGHTSLIDER STYLESHEET
wp_enqueue_style('lightslider-styles', LAUNCHPAD_PLUGIN_PATH.'css/lightslider.css');
}
add_action( 'wp_enqueue_scripts', 'launchpad_register_scripts' );
/*-----------------------------------------------------------------------------------
REGISTER LAUNCHPAD PLUGIN SETTINGS ON INSTALL
-------------------------------------------------------------------------------------*/
// ON PLUGIN ACTIVATION, EXECUTE INSTALL_LAUNCHPAD FUNCTION
register_activation_hook(__FILE__, install_launchpad());
function install_launchpad() {
// REGISTER LAUNCHPAD MENU ITEM
function launchpad_menu_item() {
add_menu_page(
'Launchpad', // TITLE TAG
'Launchpad', // MENU ITEM LABEL
'update_core', // USER CAPABILITY
'launchpad', // SLUG
'launchpad_admin_page', // CALLBACK FUNCTION
'dashicons-location-alt', // https://developer.wordpress.org/resource/dashicons/
'58' // MENU POSITION
);
}
add_action('admin_menu', 'launchpad_menu_item');
// REGISTER LAUNCHPAD SETTINGS
add_action('admin_init', 'register_launchpad_settings');
}
/*-----------------------------------------------------------------------------------
LAUNCHPAD FUNCTIONS
-------------------------------------------------------------------------------------*/
// ADD MENU SEPARATOR
function add_launchpad_admin_menu_separator($position) {
global $menu;
$menu[$position] = array(
0 => '',
1 => 'read',
2 => 'separator' . $position,
3 => '',
4 => 'wp-menu-separator'
);
}
add_action('init_custom_menu_separator', 'add_launchpad_admin_menu_separator');
// ADD MENU SEPARATOR ABOVE OPTIONS PAGE
function set_launchpad_admin_menu_separator() {
do_action('init_custom_menu_separator', 57);
}
add_action('init', 'set_launchpad_admin_menu_separator');
// LAUNCHPAD SETTINGS
function register_launchpad_settings() {
register_setting('launchpad-settings', 'launchpad');
}
// GET DIRECTORY SIZE
function get_foldersize($path) {
$total_size = 0;
$files = scandir($path);
$cleanPath = rtrim($path, '/') . '/';
foreach($files as $t) {
if ('.' != $t && '..' != $t) {
$currentFile = $cleanPath . $t;
if (is_dir($currentFile)) {
$size = get_foldersize($currentFile);
$total_size += $size;
} else {
$size = filesize($currentFile);
$total_size += $size;
}
}
}
return $total_size;
}
// FORMAT DIRECTORY SIZE
function wp_formatsize($size) {
$units = explode(' ', 'B KB MB GB TB PB');
$mod = 1024;
for ($i = 0; $size > $mod; $i++)
$size /= $mod;
$endIndex = strpos($size, ".") + 3;
return substr($size, 0, $endIndex) . ' ' . $units[$i];
}
/*-----------------------------------------------------------------------------------
LAUNCHPAD OPTIONS PAGE
-------------------------------------------------------------------------------------*/
function launchpad_admin_page() {
if (!current_user_can('manage_options')) {
wp_die(__('You do not have sufficient permissions to access this page.'));
}
// FETCH SAVED OPTION VALUES
$options = get_option('launchpad');
// FETCH DIRECTORY FOLDER SIZES
$upload_dir = wp_upload_dir();
$theme_dir = get_theme_root();
$upload_space = get_foldersize($upload_dir['basedir']);
$content_space = get_foldersize(WP_CONTENT_DIR);
$theme_space = get_foldersize($theme_dir);
$plugin_space = get_foldersize(WP_PLUGIN_DIR);
$wp_space = get_foldersize(ABSPATH);
$active_theme = get_template_directory();
$active_theme_space = get_foldersize($active_theme);
// MATH FOR DIRECTORY FOLDER SIZE PERCENTAGES
$total = $content_space;
$uploads = $upload_space / $total * 100;
$plugins = $plugin_space / $total * 100;
$themes = $theme_space / $total * 100;
$active = ($active_theme_space / 2048000) * 38.86;
echo '
';
echo screen_icon().'
Launchpad
';
echo'
';
echo '
';
}
/*-----------------------------------------------------------------------------------
FUNCTIONS FOR FEATURES
-------------------------------------------------------------------------------------*/
/*
// FETCH SAVED OPTION VALUES
$options = get_option('launchpad');
*/
/*****************************************
* AGENTS POST TYPE
*****************************************/
/*
if($options["checkbox_agents"] == 1) {
function post_type_agents() {
$labels = array(
'name' => 'Agents',
'singular_name' => 'Agent',
'add_new' => 'Add New',
'add_new_item' => 'Add New Agent',
'edit_item' => 'Edit Agent',
'new_item' => 'New Agent',
'all_items' => 'All Agents',
'view_item' => 'View Agents',
'search_items' => 'Search Agents',
'not_found' => 'No Agents found',
'not_found_in_trash' => 'No Agents found in Trash',
'parent_item_colon' => '',
'menu_name' => 'Agents'
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array('slug' => 'agent'),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => true,
'menu_position' => null,
'menu_icon' => 'dashicons-businessman',
'taxonomies' => array(''),
'supports' => array('title', 'editor', 'thumbnail')
);
register_post_type('agent' , $args);
}
add_action('init', 'post_type_agents');
}
*/
/*****************************************
* OFFICES POST TYPE
*****************************************/
/*
if($options["checkbox_offices"] == 1) {
function post_type_offices() {
$labels = array(
'name' => 'Offices',
'singular_name' => 'Office',
'add_new' => 'Add New',
'add_new_item' => 'Add New Office',
'edit_item' => 'Edit Office',
'new_item' => 'New Office',
'all_items' => 'All Offices',
'view_item' => 'View Offices',
'search_items' => 'Search Offices',
'not_found' => 'No Offices found',
'not_found_in_trash' => 'No Offices found in Trash',
'parent_item_colon' => '',
'menu_name' => 'Offices'
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array('slug' => 'office'),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => true,
'menu_position' => null,
'menu_icon' => 'dashicons-admin-multisite',
'taxonomies' => array(''),
'supports' => array('title', 'editor', 'thumbnail')
);
register_post_type('office' , $args);
}
add_action('init', 'post_type_offices');
}
*/
/*****************************************
* FAVORITES POST TYPE
*****************************************/
/*
if($options["checkbox_favorites"] == 1) {
function post_type_favorites() {
$labels = array(
'name' => 'Favorites',
'singular_name' => 'Favorite',
'add_new' => 'Add New',
'add_new_item' => 'Add New Favorites',
'edit_item' => 'Edit Favorite',
'new_item' => 'New Favorite',
'all_items' => 'All Favorites',
'view_item' => 'View Favorites',
'search_items' => 'Search Favorites',
'not_found' => 'No Favorites found',
'not_found_in_trash' => 'No Favorites found in Trash',
'parent_item_colon' => '',
'menu_name' => 'Favorites'
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array('slug' => 'favorite'),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => true,
'menu_position' => null,
'menu_icon' => 'dashicons-heart',
'taxonomies' => array(''),
'supports' => array('title', 'editor', 'thumbnail')
);
register_post_type('favorite' , $args);
}
add_action('init', 'post_type_favorites');
}
*/
?>
/**
* Framework Functions and Definitions
* @package WordPress
* @subpackage Framework
* @since Framework 1.0
*/
/*----------------------------------------------------------------------------------------------------------------------
DEREGISTER, REGISTER, AND ENQUEUE CUSTOM SCRIPTS
------------------------------------------------------------------------------------------------------------------------*/
// ******************************************************************************************************************
// ENQUEUE LOCAL JQUERY FILE
// ******************************************************************************************************************
/********************************************************************************************************************
* We deregister the built-in jQuery that comes with Wordpress and register our own local copy because upgrading
* Wordpress sometimes upgrades the version of jQuery that comes with it and this may break certain features that make
* use of functions that may be deprecated in newer versions.
*********************************************************************************************************************/
function cysy_replace_jquery() {
// DEREGISTER BUILT-IN JQUERY
wp_deregister_script( 'jquery' );
// REGISTER LOCAL JQUERY
wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery-2.2.4.min.js' );
// ENQUEUE CUSTOM JQUERY
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts', 'cysy_replace_jquery' );
// ******************************************************************************************************************
// FILES TO ENQUEUE TO THE HEADER
// ******************************************************************************************************************
function cysy_enqueue_header() {
// ENQUEUE BOOTSTRAP STYLESHEET
wp_enqueue_style( 'bootstrap-styles', get_template_directory_uri() . '/bootstrap.min.css' );
// ENQUEUE BOOTSTRAP THEME STYLESHEET
wp_enqueue_style( 'bootstrap-theme-styles', get_template_directory_uri() . '/bootstrap-theme.css' );
// ENQUEUE DEFAULT STYLESHEET
wp_enqueue_style( 'styles', get_template_directory_uri() . '/style.css' );
// ENQUEUE FONT-AWESOME STYLESHEET
wp_enqueue_style( 'font-awesome-styles', get_template_directory_uri() . '/fontawesome-all.min.css' );
// ENQUEUE ANIMATE STYLESHEET
wp_enqueue_style( 'animate-styles', get_template_directory_uri() . '/animate.css' );
// ENQUEUE ANIMATE STYLESHEET
wp_enqueue_style( 'slick-styles', get_template_directory_uri() . '/slick.css' );
// ENQUEUE MOBILE STYLESHEET
wp_enqueue_style( 'mobile-styles', get_template_directory_uri() . '/mobile.css?v=1' );
// ENQUEUE LIGHTBOX STYLESHEET
wp_enqueue_style( 'lightbox-styles', get_template_directory_uri() . '/lightbox.css' );
// ENQUEUE LIGHTSLIDER STYLESHEET
wp_enqueue_style( 'lightslider-styles', get_template_directory_uri() . '/lightslider.css' );
// ENQUEUE JQUERY UI STYLESHEET
wp_enqueue_style( 'jquery-ui-styles', get_template_directory_uri() . '/jquery-ui.css' );
// ENQUEUE JQUERY UI STRUCTURE STYLESHEET
wp_enqueue_style( 'jquery-ui-structure-styles', get_template_directory_uri() . '/jquery-ui.structure.min.css' );
// ENQUEUE JQUERY UI THEME STYLESHEET
wp_enqueue_style( 'jquery-ui-theme-styles', get_template_directory_uri() . '/jquery-ui.theme.min.css' );
// ENQUEUE PROPERTIES STYLESHEET
wp_enqueue_style( 'properties-styles', get_template_directory_uri() . '/properties.css' );
// ENQUEUE TEXTFILL SCRIPT
wp_enqueue_script( 'textfill', get_template_directory_uri() . '/js/jquery.textfill.min.js' );
// ENQUEUE MODERNIZR SCRIPT
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr-2.5.3.min.js' );
// ENQUEUE SCRIPTS FOR NESTED COMMENTS
if( is_singular() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); }
}
add_action('wp_enqueue_scripts', 'cysy_enqueue_header');
// ******************************************************************************************************************
// FILES TO ENQUEUE TO THE FOOTER
// ******************************************************************************************************************
function cysy_enqueue_footer() {
// ENQUEUE BOOTSTRAP SCRIPT
wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', null, null, true );
// ENQUEUE LIGHTBOX SCRIPT
wp_enqueue_script( 'lightbox-script', get_template_directory_uri() . '/js/lightbox.min.js', null, null, true );
// ENQUEUE JQUERY UI SCRIPT
wp_enqueue_script( 'jquery-ui-script', get_template_directory_uri() . '/js/jquery-ui.min.js', null, null, true );
// ENQUEUE SLICK SCRIPT
wp_enqueue_script( 'slick-script', get_template_directory_uri() . '/js/slick.min.js', null, null, true );
// ENQUEUE LIGHTSLIDER SCRIPT
wp_enqueue_script( 'lightslider-script', get_template_directory_uri() . '/js/lightslider.min.js', null, null, true );
// ENQUEUE WOW.JS SCRIPT
wp_enqueue_script( 'wow-script', get_template_directory_uri() . '/js/wow.min.js', null, null, true );
// ENQUEUE FOOTER SCRIPTS
wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', null, null, true );
}
add_action( 'wp_enqueue_scripts', 'cysy_enqueue_footer' );
/*----------------------------------------------------------------------------------------------------------------------
INCLUDES FOR FUNCTION FILES & OTHER LIBRARIES
------------------------------------------------------------------------------------------------------------------------*/
// ******************************************************************************************************************
// DASHBOARD FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_dashboard.php' );
// ******************************************************************************************************************
// ADMIN FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_admin.php' );
// ******************************************************************************************************************
// NAVIGATION FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_navigation.php' );
// ******************************************************************************************************************
// MAIN FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_main.php' );
// ******************************************************************************************************************
// COMMENTS, TRACKBACK, & PINGBACK FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_comments.php' );
// ******************************************************************************************************************
// CUSTOM FIELD FUNCTIONS
// ******************************************************************************************************************
//include( TEMPLATEPATH . '/php/functions_custom_fields.php' );
// ******************************************************************************************************************
// CUSTOM FUNCTIONS
// ******************************************************************************************************************
include( TEMPLATEPATH . '/php/functions_custom.php' );
?>
{"id":7172,"date":"2015-04-22T10:52:54","date_gmt":"2015-04-22T15:52:54","guid":{"rendered":"https:\/\/www.sugsands.com\/?p=7151"},"modified":"2024-05-22T17:27:55","modified_gmt":"2024-05-22T17:27:55","slug":"5-bedroom-4-bath-condo-for-rent","status":"publish","type":"post","link":"https:\/\/www.sugsands.com\/2015\/04\/22\/5-bedroom-4-bath-condo-for-rent\/","title":{"rendered":"5 Bedroom 4 Bath Condo For Rent"},"content":{"rendered":"Want The Room Of A House But The Amenities Of A Condo?<\/h2>\nThis unique condo just went under massive renovations<\/h3>\n
<\/b>
\nWindward Pointe 605 is a custom made unit made by combining 2, 3 bedroom units into a 5 bedroom 4 bath. From a custom wet bar to 2 master suites that face the gulf this luxury condo has the room to sleep up to 14 people. If you want to sit out on your huge west side wrap balcony and watch the dolphins or your kids at the pool you can do so with plenty of room. Windward Pointe offers outdoor pool with kiddie pool, BBQ grills, indoor pool with hot tub, exercise room and tennis courts. Call us 800.824.6462 or follow the link to reserve your dates. https:\/\/www.sugsands.com\/alabama-rental-properties\/Windward-Pointe-605\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Want The Room Of A House But The Amenities Of A Condo? This unique condo just went under massive renovations Windward Pointe 605 is a custom made unit made by combining 2, 3 bedroom units into a 5 bedroom 4 bath. From a custom wet bar to 2 master suites that face the gulf this […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[5,10],"class_list":["post-7172","post","type-post","status-publish","format-standard","hentry","category-news","tag-condo-rental-orange-beach-al","tag-orange-beach-alabama-condo-rentals"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/posts\/7172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/comments?post=7172"}],"version-history":[{"count":0,"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/posts\/7172\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/media?parent=7172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/categories?post=7172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sugsands.com\/wp-json\/wp\/v2\/tags?post=7172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}