Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about fields method and functions #30

Open
frozzare opened this issue Feb 26, 2019 · 0 comments
Open

Add docs about fields method and functions #30

frozzare opened this issue Feb 26, 2019 · 0 comments

Comments

@frozzare
Copy link
Member

Source:

Code example:

$fields = papi_get_fields($post_id);

[
	'name' => 'Fredrik'
]

// Same as
$name = papi_get_field('name');

// Modify fields.
class Simple_Page_Type extends Papi_Page_Type {
  public function fields($fields) {
    $fields['name'] = 'Test';
    return $fields;
  }
}

$fields = papi_get_fields($post_id);

[
	'name' => 'Test'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant