Ejemplo n.º 1
0
 public function add_plugin_admin_menu()
 {
     $includes = array('class-menu-page', 'class-main-page', 'class-reviews-page', 'class-users-ratings-page', 'class-support-page', 'class-io-page', 'class-api-page');
     foreach ($includes as $file) {
         include_once 'includes/' . $file . '.php';
     }
     RWP_Menu_Page::get_instance();
     if (!isset($_POST['rwp_io'])) {
         RWP_Template_Manager_Page::get_instance();
     }
     RWP_Main_Page::get_instance();
     RWP_Reviews_Page::get_instance();
     RWP_Users_Ratings_Page::get_instance();
     RWP_Preferences_Page::get_instance();
     RWP_IO_Page::get_instance();
     if (!RWP_EXTENDED_LICENSE) {
         RWP_Support_Page::get_instance();
     }
     RWP_API_Page::get_instance();
 }
Ejemplo n.º 2
0
 public static function preferences_field($field, $preferences, $return = false)
 {
     $default_preferences = RWP_Preferences_Page::get_preferences_fields();
     $value = isset($preferences[$field]) ? $preferences[$field] : $default_preferences[$field]['default'];
     if ($return) {
         return $value;
     }
     echo $value;
 }
 public function preferences_field($field, $return = false)
 {
     if (null == $this->default_preferences) {
         $this->default_preferences = RWP_Preferences_Page::get_preferences_fields();
     }
     $value = isset($this->preferences[$field]) ? $this->preferences[$field] : $this->default_preferences[$field]['default'];
     if ($return) {
         return $value;
     }
     echo $value;
 }
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }