Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,17 +801,16 @@ public static function admin_js() {
self::include_info_overlay();
} elseif ( FrmAppHelper::is_view_builder_page() ) {
if ( isset( $_REQUEST['post_type'] ) ) {
$post_type = sanitize_title( wp_unslash( $_REQUEST['post_type'] ) );
} elseif ( isset( $_REQUEST['post'] ) && absint( $_REQUEST['post'] ) ) {
$post = get_post( absint( wp_unslash( $_REQUEST['post'] ) ) );
$post_type = sanitize_title( FrmAppHelper::get_param( 'post_type', '', 'request' ) );
} else {
$post_id = absint( FrmAppHelper::get_param( 'post', '', 'request' ) );
$post = $post_id ? get_post( $post_id ) : null;

if ( ! $post ) {
return;
}

$post_type = $post->post_type;
} else {
return;
}

if ( $post_type === 'frm_display' ) {
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmCSVExportHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private static function set_class_parameters() {
self::$charset = get_option( 'blog_charset' );

// phpcs:ignore WordPress.Security.NonceVerification.Missing
$col_sep = ! empty( $_POST['csv_col_sep'] ) ? sanitize_text_field( wp_unslash( $_POST['csv_col_sep'] ) ) : self::$column_separator;
$col_sep = ! empty( $_POST['csv_col_sep'] ) ? sanitize_text_field( FrmAppHelper::get_post_param( 'csv_col_sep' ) ) : self::$column_separator;

self::$column_separator = apply_filters( 'frm_csv_column_sep', $col_sep, $args );
}
Expand Down
4 changes: 2 additions & 2 deletions classes/helpers/FrmListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ protected function view_switcher( $current_mode ) {
* @return int
*/
public function get_pagenum() {
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
$pagenum = absint( FrmAppHelper::get_param( 'paged', 0, 'request' ) );

if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) {
$pagenum = $this->_pagination_args['total_pages'];
Expand Down Expand Up @@ -963,7 +963,7 @@ public function print_column_headers( $with_id = true ) { // phpcs:ignore Slevom

$current_url = set_url_scheme( 'http://' . FrmAppHelper::get_server_value( 'HTTP_HOST' ) . FrmAppHelper::get_server_value( 'REQUEST_URI' ) );
$current_url = remove_query_arg( 'paged', $current_url );
$current_orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) : '';
$current_orderby = sanitize_text_field( FrmAppHelper::simple_get( 'orderby', '' ) );
$current_order = isset( $_GET['order'] ) && 'desc' === $_GET['order'] ? 'desc' : 'asc';

FrmAppController::apply_saved_sort_preference( $current_orderby, $current_order );
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmPluginSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct() {
*/
public function start( $screen ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( 'plugin-install' !== $screen->base || ( isset( $_GET['paged'] ) && 1 !== (int) $_GET['paged'] ) ) {
if ( 'plugin-install' !== $screen->base || ( isset( $_GET['paged'] ) && 1 !== (int) FrmAppHelper::simple_get( 'paged', '' ) ) ) {
return;
}

Expand Down
Loading
Loading