ID; $base_name = plugin_basename(__FILE__); $base_name = explode('/',$base_name); $base_name = $base_name['0']; $download_path = site_url() . '/index.php?' . $base_name . '=aspose_export_posts'; //http://localhost/wordpress3.9/index.php?aspose-importer-exporter=aspose_import_export_download $post_ids = array($_REQUEST['post_id']); //require_once('aspose_import_export_download.php'); $export_content = '

'; $export_content .= 'Export to PDF'; $export_content .= ' | '; $export_content .= 'Export to DOC'; $export_content .= '

'; return $export_content . $content; } add_filter('plugin_action_links', 'AsposeImportExportPluginLinks', 10, 2); /** * Create the settings link for this plugin * @param $links array * @param $file string * @return $links array */ function AsposeImportExportPluginLinks($links, $file) { static $this_plugin; if (!$this_plugin) { $this_plugin = plugin_basename(__FILE__); } if ($file == $this_plugin) { $settings_link = '' . __('Settings', 'Aspose-Importer-Exporter') . ''; array_unshift($links, $settings_link); } return $links; } register_activation_hook(__FILE__, 'SetOptionsAsposeImportExport'); /** * Basic options function for the plugin settings * @param no-param * @return void */ function SetOptionsAsposeImportExport() { } /** * For dropping the table and removing options * @param no-param * @return no-return */ function UnsetOptionsAsposeImportExport() { // Deleting the added options on plugin uninstall } register_uninstall_hook(__FILE__, 'UnsetOptionsAsposeImportExport'); function AsposeImportExportAdminRegisterSettings() { if (version_compare(PHP_VERSION, '5.3', '<')) { deactivate_plugins( plugin_basename( __FILE__ ) ); wp_die("Aspose Importer & Exporter requires PHP 5.3 or higher. You are still on ".PHP_VERSION.""); } // Registering the settings register_setting('aspose_import_export_options', 'aspose_import_export_app_sid'); register_setting('aspose_import_export_options', 'aspose_import_export_app_key'); register_setting('aspose_import_export_options', 'display_aspose_drop_down_on_front'); } add_action('admin_init', 'AsposeImportExportAdminRegisterSettings'); require_once('aspose-common-functions.php'); require_once('aspose-import-export-admin.php'); require_once('aspose-files-import.php'); require_once('aspose-files-export.php'); require_once('aspose_export_posts.php');