/** * Generate the link for the share * @param int $post_id The Post ID * @param string $name The 'Name from the cron' * @return string The URL to the post, to share */ function ppp_generate_link($post_id, $name, $scheduled = true) { global $ppp_share_settings; $share_link = get_permalink($post_id); if (ppp_link_tracking_enabled()) { $share_link = ppp_generate_link_tracking($share_link, $post_id, $name); } if (ppp_is_shortener_enabled() && $scheduled) { $shortener_name = $ppp_share_settings['shortener']; $share_link = apply_filters('ppp_apply_shortener-' . $shortener_name, $share_link); } return apply_filters('ppp_share_link', $share_link); }
/** * Display the List Table tab * @return void */ function ppp_display_schedule() { ?> <style type="text/css"> .wp-list-table .column-day { width: 5%; } .wp-list-table .column-date { width: 20%; } .wp-list-table .column-post_title { width: 25%; } .wp-list-table .column-content { width: 50%; } </style> <?php require_once PPP_PATH . 'includes/admin/class-schedule-table.php'; $schedule_table = new PPP_Schedule_Table(); $schedule_table->prepare_items(); ?> <div class="wrap"> <div id="icon-options-general" class="icon32"></div><h1><?php _e('Post Promoter Pro - Scheduled Shares', 'ppp-txt'); ?> </h1> <?php $schedule_table->display(); ?> </div> <?php if (ppp_is_shortener_enabled()) { ?> <p> <small><?php _e('NOTICE: Schedule view does not show shortened links, they will be shortened at the time of sharing', 'ppp-txt'); ?> </small> </p> <?php } ?> <?php }