/** * get_field_scope * Get the field scope based off of environment. * * @return string The field scope. * * @access public * @static * @since 1.0 */ public static function get_field_scope() { global $pagenow; $scope = null; if (piklist_admin::is_post()) { $scope = 'post_meta'; } elseif (piklist_admin::is_media()) { $scope = 'post_meta'; } elseif (piklist_admin::is_term()) { $scope = 'term_meta'; } elseif (piklist_admin::is_user()) { $scope = 'user_meta'; } elseif ($pagenow == 'admin.php' && isset($_REQUEST['page']) && $_REQUEST['page'] == 'shortcode_editor') { $scope = 'shortcode'; } return $scope; }