Inventory_Presser_Admin_Settings_Suggester::scan_for_recommended_settings_and_create_warnings()
Suggest values for WordPress internal settings if the user has values we do not prefer
Return Return
(void)
Source Source
File: includes/admin/class-admin-settings-suggester.php
public function scan_for_recommended_settings_and_create_warnings() { // Can this user even change options? if ( ! current_user_can( 'manage_options' ) ) { return; } // Is this our options page? if ( empty( $_GET['page'] ) || 'dealership-options' != $_GET['page'] ) { return; } if ( '1' === get_option( 'uploads_use_yearmonth_folders' ) ) { // Organize uploads into yearly and monthly folders is turned on. Recommend otherwise. add_action( 'admin_notices', array( $this, 'output_upload_folder_error_html' ) ); } // Are thumbnail sizes not 4:3 aspect ratios? if ( ( ( 4 / 3 ) != ( get_option( 'thumbnail_size_w' ) / get_option( 'thumbnail_size_h' ) ) ) || ( ( 4 / 3 ) != ( get_option( 'medium_size_w' ) / get_option( 'medium_size_h' ) ) ) || ( ( 4 / 3 ) != ( get_option( 'large_size_w' ) / get_option( 'large_size_h' ) ) ) ) { // At least one thumbnail size is not 4:3. add_action( 'admin_notices', array( $this, 'output_thumbnail_size_error_html' ) ); } }
Expand full source code Collapse full source code View on Github