AnsPress_Admin::page_select_field_opt( object $field )
Description #
Add link to view, edit and create right next to page select field.
Parameters #
- $fieldobject (Required) Field object.
Source #
File: admin/anspress-admin.php
public static function page_select_field_opt( $field ) { $page_slugs = array_keys( ap_main_pages() ); // Return if not the field we are looking for. if ( ! in_array( $field->original_name, $page_slugs, true ) ) { return; } $field->add_html( ' <a href="' . esc_url( get_permalink( $field->value() ) ) . '">' . __( 'View page', 'anspress-question-answer' ) . '</a> ' ); $field->add_html( '<a href="' . esc_url( get_edit_post_link( $field->value() ) ) . '">' . __( 'Edit page', 'anspress-question-answer' ) . '</a>' ); }
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:1427
Add your comment