/** * Make urls available example: PL()->urls->forum */ public function set_urls() { $editor_url = is_admin() ? home_url() : pl_get_current_url(); $url_array = array('pagelines' => 'http://www.pagelines.com', 'platform' => 'http://www.pagelines.com/platform/', 'purchase' => 'http://www.pagelines.com/purchase/', 'pro' => 'http://www.pagelines.com/pro/', 'oauth' => 'https://www.pagelines.com/oauth', 'cdn' => 'http://wpecdn.pagelines.com', 'docs' => 'http://www.pagelines.com/resources', 'forum' => 'https://forum.pagelines.com', 'my_account' => 'https://www.pagelines.com/my-account', 'quickstart' => 'https://www.youtube.com/watch?v=1p7hEy9h06g', 'editor' => add_query_arg(array('pl_edit' => 'on', 'plstart' => 'yes'), $editor_url), 'deactivate' => add_query_arg(array('pl_edit' => 'off'), $editor_url)); $this->urls = new stdclass(); foreach ($url_array as $key => $url) { $this->urls->{$key} = $url; } }
function template($atts, $content) { global $post; extract(shortcode_atts(array('url' => pl_get_current_url(false)), $atts)); $out = sprintf('<div class="fb-like" data-href="%s" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>', $url); return $out; }
function workarea() { ?> <!DOCTYPE HTML> <html lang="en"> <head> <meta charset="<?php bloginfo('charset'); ?> " /> <link rel="profile" href="http://gmpg.org/xfn/11" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="cache-control" content="no-cache" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <?php echo pl_favicon(); ?> <title>PageLines Workarea</title> <?php do_action('pl_workarea_head'); ?> <?php wp_head(); ?> </head> <body <?php body_class('pl-workarea'); ?> > <?php do_action('pl_workarea_body_open'); ?> <div class="workarea-loading-overlay"></div> <div class="pl-composer"> <div class="iframe-container"> <?php $current_url = pl_get_current_url(); $iframe_url = add_query_arg(array('iframe' => 'true', 'rand' => rand(1, 999999)), $current_url); $iframe_url = remove_query_arg('pl_edit', $iframe_url); printf('<iframe class="site-frame" src="%s" scrolling="yes" ></iframe>', $iframe_url); ?> <div class="iframe-loading-overlay show-overlay"> <div class="loading-graphic"><i class="iframe-loading-icon pl-icon pl-icon-cog pl-icon-spin"></i></div> </div> </div> <div class="pl-workarea-sidebar-container"> <div class="pl-workarea-sidebar"></div> </div> </div> <?php pl_hook('pl_workarea_footer'); pl_hook('pl_workarea_scripts'); // dep ?> </body> </html><?php /** Prevents output of anything from templates or plugins */ die('<!-- Have a great day! -->'); }