| Line | |
|---|
| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * Songbook AJAX |
|---|
| 5 | * |
|---|
| 6 | * Uses WP AJAX to get data through Javascript |
|---|
| 7 | * |
|---|
| 8 | * @since v. 2.0. |
|---|
| 9 | * @version 1.0 |
|---|
| 10 | * @author Sjiamnocna |
|---|
| 11 | * @copyright (c) 2015 Sjiamnocna |
|---|
| 12 | * |
|---|
| 13 | */ |
|---|
| 14 | |
|---|
| 15 | class songbook_ajax extends songbook_functions { |
|---|
| 16 | |
|---|
| 17 | public function __construct() { |
|---|
| 18 | add_action('wp_ajax_gdocstitle', array($this, 'gdocstitle')); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | function gdocstitle($url = false) { |
|---|
| 22 | $toret = $this->gettitle($url); |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | if (!$toret) |
|---|
| 26 | return $toret; |
|---|
| 27 | else |
|---|
| 28 | echo $toret; |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | $wpsb_ajax = new songbook_ajax(); |
|---|
Note: See
TracBrowser
for help on using the repository browser.