Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Think B4 U Code

Think B4 U Code

A brief example why using third party plugins can save you time in your development.
---
A Lightning Talk at WordCamp Berlin 2015

Hans-Helge Buerger

November 14, 2015
Tweet

More Decks by Hans-Helge Buerger

Other Decks in Programming

Transcript

  1. Think B4 U Code
    ~Exploit other peoples code~
    WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 1

    View full-size slide

  2. WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 2

    View full-size slide

  3. WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 3

    View full-size slide

  4. /**
    * Helper function to retrieve all entries from specific caldera form.
    *
    * @param string $form_id ID of caldera form.
    *
    * @return array Retrieved entries
    */
    private function get_entries( $form_id ) {
    /**
    * In front-end admin class is not included.
    *
    * @const CFCORE_PATH Caldera Forms absolute path
    */
    require_once( CFCORE_PATH . 'classes/admin.php' );
    //get all entries (page 1 with 9999999 entries per page should do it:)
    $data = \Caldera_Forms_Admin::get_entries( $form_id, 1, 9999999 );
    // $data has extra meta info. $entries has just the entries
    return ( $data['total'] > 0 ) ? $data['entries'] : [ ];
    }
    WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 4

    View full-size slide

  5. WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 5

    View full-size slide

  6. [!]
    WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 6

    View full-size slide

  7. WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 7

    View full-size slide