File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
/home/pharmacy/www/wp-content/plugins/visual-form-builder/admin/class-screen-options.php
<?php
/**
 * Handle Screen Options
 *
 * Defines and saves all options in Screen Options tabs
 */
class Visual_Form_Builder_Admin_Screen_Options {

	/**
	 * Add options to Screen Options
	 *
	 * @access public
	 * @return void
	 */
	public function add_option() {
		if ( isset( $_GET['form'] ) ) {
			add_screen_option(
				'layout_columns',
				array(
					'max'     => 2,
					'default' => 2,
				)
			);
		} else {
			add_screen_option(
				'per_page',
				array(
					'label'   => __( 'Forms per page', 'visual-form-builder' ),
					'default' => 20,
					'option'  => 'vfb_forms_per_page',
				)
			);
		}
	}

	/**
	 * Add options to Entries page
	 */
	public function add_option_entries() {
		add_screen_option(
			'per_page',
			array(
				'label'   => __( 'Entries per page', 'visual-form-builder' ),
				'default' => 20,
				'option'  => 'vfb_entries_per_page',
			)
		);
	}

	/**
	 * Save Screen Options
	 *
	 * @param   [type] $status  Return this so we don't break other plugins.
	 * @param   [type] $option  The option name.
	 * @param   [type] $value   The submitted value.
	 *
	 * @return  [type]           [return description]
	 */
	public function save_option( $status, $option, $value ) {
		if ( 'vfb_forms_per_page' == $option ) {
			return $value;
		}

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

		return $status;
	}
}