getRemainingBookletCount(); include realpath( WP_BOOKLET2_DIR . "themes/admin/default/importer-page.php" ); } /** * Make booklets 2.0 compatible * * @return void */ function import_booklets() { $limit = 1; $importer = new WP_Booklet2_Importer($limit); $importer->import(); $result = array( 'remaining'=>$importer->getRemainingBookletCount() ); echo json_encode( $result ); die(); } /** * Render nag * * @return void */ function import_notice() { if ( isset ( $_GET['page'] ) ) { if ( $_GET['page'] == 'wp-booklet2-import' ) { return; } } $importer = new WP_Booklet2_Importer(); if ( $importer->getRemainingBookletCount() > 0 ) { include realpath( WP_BOOKLET2_DIR . "themes/admin/default/import-nag.php" ); } } }