Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkbone committed Mar 4, 2024
1 parent 7ca8b1e commit 27c7bb4
Show file tree
Hide file tree
Showing 20 changed files with 3,213 additions and 1,524 deletions.
32 changes: 32 additions & 0 deletions tags/1.0.4/ajax_endpoints.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Breakdance\AjaxEndpoints;

add_action('breakdance_loaded', function () {
\Breakdance\AJAX\register_handler(
'gravitydance_get_forms',
'Breakdance\AjaxEndpoints\gravitydancegetforms',
'edit',
true
);
});

if (! function_exists('Breakdance\AjaxEndpoints\gravitydancegetforms')){
function gravitydancegetforms(){
$forms = \GFAPI::get_forms();
$list = [];
foreach ($forms as $form) {
$id = strval(rgar($form, 'id'));
$title = rgar($form, 'title');
/* translators: %1$s: form ID. %2$s: form title. */
$text = sprintf(esc_html__('#%1$s: %2$s', 'gravitydance'), $id, $title);
$list[] = [
'value' => $id,
'text' => $text
];
}
$list = wp_json_encode($list);
$list = json_decode($list);
return $list;
}
}
595 changes: 595 additions & 0 deletions tags/1.0.4/elements/Gravity_Form/css.twig

Large diffs are not rendered by default.

Empty file.
Loading

0 comments on commit 27c7bb4

Please sign in to comment.