Apture makes it easy to add contextual images, videos, reference guides, links, maps, music, news, documents and books to your blog to create a connected media experience that keeps readers engaged on your site. Version:1.3 Author: Apture, Inc. Author URI: http://www.apture.com */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $apture_site_token_key = "apture_site_token"; $apture_plugin_version = "wp_13"; $apture_wordpress_platform = "WordpressOrg"; $apture_domain = "http://www.apture.com"; $apture_prefilled_site_token = ""; $apture_nonce_action = 'apture-update-site-token'; function apture_die($msg) { if (!function_exists('wp_die')) { wp_die($msg); } else { die(); } } function apture_is_admin() { if (!function_exists('is_admin')) { return false; } else { return is_admin(); } } function apture_redirect($url) { if (!function_exists('wp_redirect')) { return header("Location: " . $url); } else { return wp_redirect($url); } die(); } function apture_nonce_field($action=-1, $name) { if (!function_exists('wp_nonce_field')) { return; } else { return wp_nonce_field($action, $name); } } function apture_verify_nonce($nonce, $action=-1) { if (!function_exists('wp_verify_nonce')) { return false; } else { return wp_verify_nonce($nonce, $action); } } function apture_get_domain() { global $apture_domain; return $apture_domain; } function apture_site_url() { $siteUrl = get_option('siteurl'); $siteUrlLen = strlen($siteUrl); if ($siteUrlLen > 0 && $siteUrl[strlen($siteUrl)-1] == '/') { $sep = ''; } else { $sep = '/'; } return "{$siteUrl}{$sep}"; } function apture_page_url() { return str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); } function apture_update_footer() { echo ""; $footerFile = TEMPLATEPATH . '/footer.php'; if (!file_exists($footerFile)) { $footerFile = ABSPATH . 'wp-content/themes/default/footer.php'; } $footerTemplate = file_get_contents($footerFile); if ($footerTemplate == FALSE) { $result = FALSE; } else if (!preg_match('/apture_script/', $footerTemplate)) { $footerTemplate = "\n".$footerTemplate; $fp = fopen($footerFile, 'w'); if ($fp == FALSE) { if (!preg_match('/wp_footer/', $footerTemplate)) # don't complain if they have wp_footer in their template already { $result = FALSE; } else { $result = TRUE; } } else { fwrite($fp, $footerTemplate); fclose($fp); $result = TRUE; } } else { $result = TRUE; } echo ""; return $result; } function apture_render_auto_install_form() { global $apture_nonce_action;?>
<?php function_exists('apture_script') && apture_script(); ?>
Click the button below to automatically add this tag to your site's footer.php template.
Congratulations. The Apture Editor Plugin has been successfully installed.