Function Reference: geodir_import_export_page
Summary
Display the page to manage import/export categories/listings.
Package
GeoDirectory
Return Values
- (string)
- Html content.
Change Log
Since: 1.4.6
1.5.6 Option added to export max number listings per csv file.
Actions
‘geodir_sample_csv_download_link’ [Line: 2355]
‘geodir_sample_cats_csv_download_link’ [Line: 2477]
‘geodir_import_export’ [Line: 2566]
Filters
‘geodir_export_cats_sample_csv’ [Line: 2237]
‘geodir_export_posts_sample_csv’ [Line: 2248]
‘geodir_export_csv_chunksize_options’ [Line: 2278]
Source File
geodir_import_export_page() is located in geodirectory-admin/admin_functions.php [Line: 2226]
Source Code
function geodir_import_export_page() { $nonce = wp_create_nonce( 'geodir_import_export_nonce' ); $gd_cats_sample_csv = geodir_plugin_url() . '/geodirectory-assets/gd_sample_categories.csv'; /** * Filter sample category data csv file url. * * @since 1.0.0 * @package GeoDirectory * * @param string $gd_cats_sample_csv Sample category data csv file url. */ $gd_cats_sample_csv = apply_filters( 'geodir_export_cats_sample_csv', $gd_cats_sample_csv ); $gd_posts_sample_csv = geodir_plugin_url() . '/geodirectory-assets/place_listing.csv'; /** * Filter sample post data csv file url. * * @since 1.0.0 * @package GeoDirectory * * @param string $gd_posts_sample_csv Sample post data csv file url. */ $gd_posts_sample_csv = apply_filters( 'geodir_export_posts_sample_csv', $gd_posts_sample_csv ); $gd_posttypes = geodir_get_posttypes( 'array' ); $gd_posttypes_option = ''; foreach ( $gd_posttypes as $gd_posttype => $row ) { $gd_posttypes_option .= ''; } wp_enqueue_script( 'jquery-ui-progressbar' ); $gd_chunksize_options = array(); $gd_chunksize_options[100] = 100; $gd_chunksize_options[200] = 200; $gd_chunksize_options[500] = 500; $gd_chunksize_options[1000] = 1000; $gd_chunksize_options[2000] = 2000; $gd_chunksize_options[5000] = 5000; $gd_chunksize_options[10000] = 10000; $gd_chunksize_options[20000] = 20000; $gd_chunksize_options[50000] = 50000; $gd_chunksize_options[100000] = 100000; /** * Filter max entries per export csv file. * * @since 1.5.6 * @package GeoDirectory * * @param string $gd_chunksize_options Entries options. */ $gd_chunksize_options = apply_filters( 'geodir_export_csv_chunksize_options', $gd_chunksize_options ); $gd_chunksize_option = ''; foreach ($gd_chunksize_options as $value => $title) { $gd_chunksize_option .= ''; } $uploads = wp_upload_dir(); $upload_dir = wp_sprintf( CSV_TRANSFER_IMG_FOLDER, str_replace( ABSPATH, '', $uploads['path'] ) ); ?>Import & Export page. * * Called after the last setting on the GD > Import & Export page. * @since 1.4.6 * @package GeoDirectory * * @param array $gd_posttypes GD post types. * @param array $gd_chunksize_options File chunk size options. * @param string $nonce WordPress security token for GD import & export. */ do_action( 'geodir_import_export', $gd_posttypes, $gd_chunksize_options, $nonce ); ?>