コード例 #1
0
ファイル: class-admin-form.php プロジェクト: syncopetwice/STG
 /**
  * Create a form element to init a form
  *
  * @param string $namespace
  *
  * @return string
  */
 public static function create_form($namespace)
 {
     self::$form_namespace = $namespace;
     $action = admin_url('admin.php');
     if (isset($_GET['page'])) {
         $action .= '?page=' . $_GET['page'];
     }
     return '<form action="' . $action . '" method="post" id="yoast-ga-form-' . self::$form_namespace . '" class="yoast_ga_form">' . wp_nonce_field('save_settings', 'yoast_ga_nonce', null, false);
 }