Skip to content

Instantly share code, notes, and snippets.

Josh Pollock Shelob9

View GitHub Profile
@Shelob9
Shelob9 / total-entries.php
Last active Apr 19, 2019
Get the total number of saved entry for a Caldera Forms form
View total-entries.php
<?php
$total = Caldera_Forms_Entry_Bulk::count( 'CF12456' );
View composer.json
{
"name": "shelob9/futurecapable",
"minimum-stability": "dev",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "git",
View composer.json
{
"name": "shelob9/contact-form",
"license": "GPL-2.0",
"type": "wordpress-muplugin"
}
@Shelob9
Shelob9 / README.md
Created Mar 21, 2019
Caldera Forms.com -> wp-content/mu-plugins/edd_recurring_create_subscription_args.php
View README.md

I got this error with the EDD Authorize.net add-on Error: E00003: The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:name' element is invalid - The value 'Caldera Forms Pro Basic Monthly - Basic (Billed Monthly)' is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value.

The automatically generated subscription name was too long.

View .lando.yml
name: caldera
recipe: wordpress
config:
env: dev
xdebug: true
php: '7.2'
via: nginx
webroot: wordpress
proxy:
mailhog:
@Shelob9
Shelob9 / load-cf-css.php
Created Mar 11, 2019
Load all CSS for Caldera Forms.
View load-cf-css.php
<?php
if ( class_exists( 'Caldera_Forms_Render_Assets' ) && class_exists( 'Caldera_Forms' ) ) {
\Caldera_Forms_Render_Assets::maybe_register();
\Caldera_Forms_Render_Assets::optional_style_includes();
\Caldera_Forms_Render_Assets::enqueue_style('front' );
\Caldera_Forms_Render_Assets::enqueue_style('fields' );
foreach (\Caldera_Forms_Fields::get_all() as $field_type ){
if( !empty( $field_types['styles'])){
foreach($field_types['styles'] as $style){
@Shelob9
Shelob9 / .lando.yml
Last active Mar 7, 2019
Lando + xdebug phpStorm
View .lando.yml
name: formcalderas
recipe: wordpress
config:
env: dev
xdebug: true
php: '7.1'
proxy:
mailhog:
- mail.formcalderas.lndo.site
pma:
View block.js
const Display = (props) => (
<div>{props.whatever}</div>
);
registerBlockType(
"hi/roy",
{
//...
edit({ attributes, setAttributes }) {
View remove-cf-pro-submenu-for-all-but-one-users.php
<?php
/**
* Remove Caldera Forms Pro sub menu if user has the ID of 1
*/
add_action( 'admin_menu', function () {
if( ! class_exists( 'Caldera_Forms' ) ){
return;
}
$user = get_current_user_id();
if (1 != $user ) {
@Shelob9
Shelob9 / .lando.yml
Created Feb 25, 2019
WIP -> Lando with WordPress "unit" test suite.
View .lando.yml
name: wordpress
recipe: wordpress
config:
env: dev
xdebug: true
php: '7.2'
via: nginx
webroot: wordpress
proxy:
mailhog:
You can’t perform that action at this time.