This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function md_acf_set_options_page( $settings ) | |
{ | |
$settings['title'] = 'flowlife'; | |
$settings['capability'] = 'manage_options'; | |
$settings['pages'] = array('flowlife'); | |
return $settings; | |
} | |
add_filter('acf/options_page/settings', 'md_acf_set_options_page'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sl_get_ip() { | |
if ( isset( $_SERVER['HTTP_CLIENT_IP'] ) && ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} else { | |
$ip = ( isset( $_SERVER['REMOTE_ADDR'] ) ) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'; | |
} | |
$ip = filter_var( $ip, FILTER_VALIDATE_IP ); | |
$ip = ( $ip === false ) ? '0.0.0.0' : $ip; |