get_settings(); $rayetun_ag_md_pt = get_post_types( array( 'public' => true ), 'objects' ); $rayetun_ag_md_selected = (array) ( $rayetun_ag_md_settings['post_types'] ?? array( 'post', 'page' ) ); // A real sample URL the admin can click to view a page as Markdown in the browser. $rayetun_ag_md_sample = ''; $rayetun_ag_md_recent = get_posts( array( 'numberposts' => 1, 'post_status' => 'publish', 'post_type' => ! empty( $rayetun_ag_md_selected ) ? $rayetun_ag_md_selected : array( 'post', 'page' ), ) ); if ( ! empty( $rayetun_ag_md_recent ) ) { $rayetun_ag_md_sample = add_query_arg( 'rayetun_ag_md', '1', get_permalink( $rayetun_ag_md_recent[0] ) ); } ?>