public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; $apikey = getbapiapikey(); if (!empty($apikey)) { $fname = get_stylesheet_directory() . '/insta-default-content/insta-footer.php'; if (!file_exists($fname)) { $fname = plugin_dir_path(__FILE__) . 'insta-default-content/insta-footer.php'; } if (file_exists($fname)) { $t = file_get_contents($fname); $m = new Mustache_Engine(); $wrapper = getbapisolutiondata(); //print_r($wrapper); $string = $m->render($t, $wrapper); echo $string; } elseif (is_newapp_website()) { echo '<div id="poweredby"><a rel="nofollow" target="_blank" href="http://kigo.net">Vacation Rental Software by Kigo</a></div>'; } else { echo '<div id="poweredby"><a rel="nofollow" target="_blank" href="http://www.InstaManager.com">Vacation Rental Software by InstaManager</a></div>'; } } elseif (is_newapp_website()) { echo '<div id="poweredby"><a rel="nofollow" target="_blank" href="http://kigo.net">Vacation Rental Software by Kigo</a></div>'; } else { echo '<div id="poweredby"><a rel="nofollow" target="_blank" href="http://www.InstaManager.com">Vacation Rental Software by InstaManager</a></div>'; } echo $after_widget; }
private function get_setup_header() { if (is_newapp_website()) { return '<h1><img src="' . get_kigo_plugin_url('/img/logo_kigo.png') . '"/></h1>'; } else { return '<h1><a href="http://www.bookt.com" target="_blank"><img src="' . get_kigo_plugin_url('/img/logo-im.png') . '" /></a></h1>'; } }
public static function register_admin_bar_node() { // Only new app clients have this extra toolbar to link to the app if (!is_newapp_website()) { return; } global $wp_admin_bar; // Create parent node $wp_admin_bar->add_node(array('id' => self::PARENT_NODE_ID, 'title' => '<span class="ab-icon ab-icon-kigo"><img src="' . get_kigo_plugin_url(self::PARENT_NODE_ICON) . '"></span><span>' . self::PARENT_NODE_TITLE . '</span>', 'parent' => false, 'href' => self::APP_URL, 'meta' => array('target' => '_blank'))); // Create every child nodes foreach (self::$kigo_app_nodes as $id => $kigo_app_node) { $wp_admin_bar->add_node(array('id' => $id, 'title' => '<span class="dashicons-before dashicons-kigo ' . $kigo_app_node['icon'] . '"></span><span>' . $kigo_app_node['title'] . '</span>', 'parent' => self::PARENT_NODE_ID, 'href' => self::APP_URL . $kigo_app_node['href'], 'meta' => array('target' => '_blank'))); } }
function register_tips_box() { /* Tips Metabox */ $items = array(array(url => "https://codex.wordpress.org/WordPress_Widgets", icon => "welcome-icon dashicons-editor-help", name => "What are widgets"), array(url => is_newapp_website() ? '//supportdocs.imbookingsecure.com/managing_seo_keywords' : "http://support.bookt.com/customer/portal/articles/1200398-managing-seo-and-keywords-for-your-instasite", icon => 'welcome-icon dashicons-analytics', name => 'How to Manage SEO'), array(url => is_newapp_website() ? '//supportdocs.imbookingsecure.com/featured_properties_widget' : "http://support.bookt.com/customer/portal/articles/1394482-featured-properties-widget", icon => "welcome-icon dashicons-admin-post", name => "Change your Featured Properties settings"), array(url => is_newapp_website() ? '//supportdocs.imbookingsecure.com/websites' : "http://support.bookt.com/customer/portal/topics/566455-instasites/articles", icon => "welcome-icon dashicons-sos", name => "View All " . (is_newapp_website() ? 'Kigo sites' : 'InstaSite') . " Help Topics"), array(url => is_newapp_website() ? '//supportdocs.imbookingsecure.com' : "http://support.bookt.com/", icon => "welcome-icon welcome-view-site", name => "Visit Support")); // Display the container echo '<div class="welcome-panel rss-widget custom">'; echo '<ul>'; echo '<li><div class="welcome-icon dashicons-welcome-learn-more">How to create a <a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Blog</a> or <a href="http://codex.wordpress.org/Pages" target="_blank">Page</a></div></li>'; for ($i = 0; $i < count($items); $i++) { echo '<li>'; echo '<a href="' . $items[$i]['url'] . '" class="' . $items[$i]['icon'] . '" target="_blank">'; echo $items[$i]['name']; echo '</a>'; echo '</li>'; } echo '</ul></div>'; }
} return false; }); }); </script> <style>.button.clear-btn,.button.down-btn,.button.up-btn{padding-top:4px;}</style> <div class="wrap"> <?php if (is_newapp_website()) { echo '<h1><img src="' . plugins_url('/img/logo_kigo.png', __FILE__) . '"/></h1>'; } else { echo '<h1><a href="http://www.bookt.com" target="_blank"><img src="' . plugins_url('/img/logo-im.png', __FILE__) . '" /></a></h1>'; } ?> <h2><?php echo is_newapp_website() ? 'Slideshow Setup' : 'InstaSite Plugin - Slideshow Setup'; ?> </h2> <form method="post"> <table class="form-table"> <tr> <th scope="row">Slide 1</th> <td> Image: <input type="text" id='bapi_slideshow_image1' name="bapi_slideshow_image1" size="60" value="<?php echo get_option('bapi_slideshow_image1'); ?> " /><input type="button" id="image-pick1" name="image-pick1" value="Select Image" class="button" /><a href="#" class="button clear-btn" data-for="bapi_slideshow_image1"><img alt="Clear" title="Clear Field" src="<?php echo WPIS_URL; ?> /img/remove_2.png" /></a><a href="#" class="button down-btn" data-for="1"><img alt="Down" src="<?php echo WPIS_URL;
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function($){ $('#bapi_google_webmaster_htmltag').click(function() { $("#bapi_google_webmaster_htmltag-large").dialog({ width: $(window).width()-60, height: $(window).height()-60 });}); }); </script> <div class="wrap"> <?php if (is_newapp_website()) { echo '<h1><img src="' . plugins_url('/img/logo_kigo.png', __FILE__) . '"/></h1>'; } else { echo '<h1><a href="http://www.bookt.com" target="_blank"><img src="' . plugins_url('/img/logo-im.png', __FILE__) . '" /></a></h1>'; } ?> <h2><?php echo is_newapp_website() ? 'Advanced Options' : 'InstaSite Plugin - Advanced Options'; ?> </h2> <form method="post"> <table class="form-table"> <tr valign="top"> <td scope="row">Google AdWords Conversion Key<br/><em><small>The google_conversion_id value</small></em></td> <td><input type="text" name="bapi_google_conversion_key" id="bapi_google_conversion_key" size="80" value="<?php echo esc_attr($bapi_all_options['bapi_google_conversion_key']); ?> " /></td> </tr> <tr valign="top"> <td scope="row">Google AdWords Conversion Label<br/><em><small>The google_conversion_label value no quotes</small></em></td> <td><input type="text" name="bapi_google_conversion_label" id="bapi_google_conversion_label" size="80" value="<?php echo esc_attr($bapi_all_options['bapi_google_conversion_label']);
" /></td> </tr> <tr valign="top" style="<?php if (!is_super_admin()) { echo 'display:none;'; } ?> "> <td scope="row">Cloudfront ID:</td> <td><input type="text" name="bapi_cloudfrontid" size="60" value="<?php echo $cloudfrontid; ?> " /></td> </tr> <tr> <?php if (is_newapp_website()) { echo '<td colspan="2"><em>If you do not already have an API key for Kigo, please contact <a href="mailto:support@kigo.net?subject=API%20Key%20-%20Wordpress%20Plugin">support@kigo.net</a> to obtain an API key.</em></td>'; } else { echo '<td colspan="2"><em>If you do not already have an API key for Bookt, please contact <a href="mailto:support@bookt.com?subject=API%20Key%20-%20Wordpress%20Plugin">support@bookt.com</a> to obtain an API key.</em></td>'; } ?> </tr> </table> <div class="clear"></div> <?php submit_button(); ?> </form> </div>
/* we get BAPI */ loadscriptjquery(); getconfig(); ?> <div class="wrap sitesettings-wrapper" style="display: none;"> <?php if (is_newapp_website()) { echo '<h1><img src="' . plugins_url('/img/logo_kigo.png', __FILE__) . '"/></h1>'; } else { echo '<h1><a href="http://www.bookt.com" target="_blank"><img src="' . plugins_url('/img/logo-im.png', __FILE__) . '" /></a></h1>'; } ?> <h2><?php echo is_newapp_website() ? 'Property & Search Settings' : 'InstaSite Plugin - Property & Search Settings'; ?> </h2> <form method="post"> <h3>Search Result Display Modes</h3> <table class="form-table"> <tr valign="top"> <td scope="row">List View:</td> <td><input class="searchmode-listview-cbx" type="checkbox" checked="" /> <input type="hidden" id="searchmode-listview" name="searchmode-listview" data-prevalue="BAPI.config().searchmodes.listview=" value="" /> </td> </tr> <tr valign="top"> <td scope="row">Photo View:</td> <td><input class="searchmode-photoview-cbx" type="checkbox" checked="" />
?> <a class="button" href="http://www.whatsmydns.net/#CNAME/<?php echo $cdn_url['host']; ?> /<?php echo get_option('bapi_cloudfronturl'); ?> " target="_blank">Test <strong>CNAME</strong></a><?php } ?> </p> <div id="gdsetup" class="bapi_expand"> <h4 title="Click Here to Show Instructions">[+] GoDaddy DNS Setup Instructions</h4> <div class="bapi_expand_hidden"> <em>Please note that these instructions are generated based on the current version of GoDaddy's website and DNS management tools. Please contact <?php echo is_newapp_website() ? '*****@*****.**' : '*****@*****.**'; ?> to report any discrepancies.</em> <ol> <li>Go to <a href="http://dcc.godaddy.com">GoDaddy.com</a> and sign in to your account.</li> <li>From the <em>Domains</em> management screen, click on the domain name you wish to update.<br/> <img src="<?php echo plugins_url('/img/dns/godaddy-domains-summary.png', __FILE__); ?> "/></li> <li>On the <em>Domain Details</em> screen, click on the <em>DNS Zone File</em> tab and then click <em>Edit</em>. This will open the <em>Zone File Editor</em> in a new browser tab.<br/> <img src="<?php echo plugins_url('/img/dns/godaddy-domain-detail.png', __FILE__); ?> "/></li> <li>Locate the <em>A (Host)</em> record for <em>"@"</em> and set it to <strong id="bapi_wildcard_ip_inst"></strong>. Use the <em>Quick Add</em> button if the record does not already exist.<br/>
getconfig(); // need this to update detail pages $soldata = json_decode(get_option('bapi_solutiondata'), TRUE); ?> <div class="wrap"> <?php if (is_newapp_website()) { echo '<h1><img src="' . plugins_url('/img/logo_kigo.png', __FILE__) . '"/></h1>'; } else { echo '<h1><a href="http://www.bookt.com" target="_blank"><img src="' . plugins_url('/img/logo-im.png', __FILE__) . '" /></a></h1>'; } ?> <h2><?php echo is_newapp_website() ? 'Data Sync Setup' : 'InstaSite Plugin - Data Sync Setup'; ?> </h2> <h3>Initial Configuration</h3> <div style="margin-top:-5px;"> <input class="button-primary setuppages" value="Create Default Pages"> </div> <div class="clear"></div> <small>Note: Permalink Settings should be set to Post name for the menu structure to function correctly.</small> <div class="clear"></div> <br /> <h3>Property pages synchronization information</h3> <table class="widefat" style="width:auto"> <tr>
function kigo_login_logo() { ?> <style type="text/css"> body.login div#login h1 a { background-image: url(<?php echo is_newapp_website() ? get_relative(plugins_url('img/logo_kigo.png', __FILE__)) : get_relative(plugins_url('img/wp-login-im-logo.png', __FILE__)); ?> ); background-size:auto auto; width:auto; } </style> <?php }