コード例 #1
0
/**
 * Returns the main instance of Footnotes_Propelled to prevent the need to use globals.
 *
 * @since  1.0.0
 * @return object Footnotes_Propelled
 */
function Footnotes_Propelled()
{
    $instance = Footnotes_Propelled::instance(__FILE__, '1.0.0');
    if (is_null($instance->settings)) {
        $instance->settings = Footnotes_Propelled_Settings::instance($instance);
    }
    return $instance;
}
 /**
  * Main Footnotes_Propelled_Settings Instance
  *
  * Ensures only one instance of Footnotes_Propelled_Settings is loaded or can be loaded.
  *
  * @since 1.0.0
  * @static
  * @see Footnotes_Propelled()
  * @return Main Footnotes_Propelled_Settings instance
  */
 public static function instance($parent)
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self($parent);
     }
     return self::$_instance;
 }