esc_html__( 'Show More', "poll-maker" ), 'show_less' => esc_html__( 'Show Less', "poll-maker" ), ) ); } private function get_latest_changelog_entries($limit = 3) { $readme_path = plugin_dir_path(__FILE__) . '../README.txt'; if ( ! file_exists( $readme_path ) ) { return array(); } $content = file_get_contents( $readme_path ); // Extract only the Changelog section if ( preg_match( '/==\s*Changelog\s*==(.*)/is', $content, $matches ) ) { $changelog = trim($matches[1]); } else { return array(); } // Split each version entry preg_match_all( '/=+\s*(.*?)\s*=+\s*(.*?)(?=(?:=+\s*[\d\.]+|\Z))/is', $changelog, $entries, PREG_SET_ORDER ); $releases = array(); foreach ( $entries as $entry ) { $title = trim($entry[1]); $changes = trim($entry[2]); // Extract version and date if available if ( preg_match('/([\d\.]+).*?\((.*?)\)/', $title, $version_match) ) { $version = trim($version_match[1]); $date = trim($version_match[2]); } else { $version = $title; $date = ''; } // Split lines like * Added: Something $lines = array_filter(array_map('trim', preg_split('/\r\n|\r|\n/', $changes))); $lines = array_map(function($line) { return preg_replace('/^\*\s*/', '', $line); }, $lines); $releases[] = array( 'version' => $version, 'date' => $date, 'changes' => $lines, ); } return array_slice($releases, 0, $limit); } /** * Getting Started screen. Shows after first install. * * @since 1.0.0 */ public function output($hide_close_button = false) { $latest_changelog = $this->get_latest_changelog_entries(3); ?>
poll-w-logo

Getting Started with Poll Maker
1:18
Advanced Poll Customization
2:00
Embedding Polls on Your Site
3:26

demo

doc

community

support

v