/** * The main function responsible for returning the one true RatingWidgetPlugin instance * to functions everywhere. * * Use this function like you would a global variable, except without needing * to declare the global. * * Example: <?php $rw = ratingwidget(); ?> * * @return RatingWidgetPlugin The one true RatingWidgetPlugin instance */ function ratingwidget() { global $rwp; if (!isset($rwp)) { // Init Freemius. rw_fs(); // rw_load_constants(); $rwp = RatingWidgetPlugin::Instance(); $rwp->Init(); } return $rwp; }
/** * The main function responsible for returning the one true RatingWidgetPlugin Instance * to functions everywhere. * * Use this function like you would a global variable, except without needing * to declare the global. * * Example: <?php $rw = ratingwidget(); ?> * * @return RatingWidgetPlugin The one true RatingWidgetPlugin Instance */ function ratingwidget() { global $rwp; if (!isset($rwp)) { $rwp = RatingWidgetPlugin::Instance(); } return $rwp; }