PluginProbe
Members – Membership & User Role Editor Plugin / 3.2.24
Members – Membership & User Role Editor Plugin v3.2.24
3.2.25 3.2.26 3.2.24 3.2.23 3.2.22 3.2.21 trunk 0.1 0.1.1 0.2 0.2.1 0.2.2 0.2.3 0.2.4 0.2.5 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 2.0.0 2.0.1 2.0.2 All 66 releases
members / inc / functions.php

functions.php in Members – Membership & User Role Editor Plugin 3.2.24, at inc/functions.php

44 lines 1017 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * General functions file for the plugin.
4 *
5 * @package Members
6 * @subpackage Includes
7 * @author The MemberPress Team
8 * @copyright Copyright (c) 2009 - 2018, The MemberPress Team
9 * @link https://members-plugin.com/
10 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11 */
12 if (!defined('ABSPATH')) {
13 die('You are not allowed to call this page directly.');
14 }
15
16 /**
17 * Validates a value as a boolean. This way, strings such as "true" or "false" will be converted
18 * to their correct boolean values.
19 *
20 * @since 1.0.0
21 * @access public
22 * @param mixed $val
23 * @return bool
24 */
25 function members_validate_boolean( $val ) {
26
27 return filter_var( $val, FILTER_VALIDATE_BOOLEAN );
28 }
29
30
31 /**
32 * Helper function for sorting objects by priority.
33 *
34 * @since 2.0.0
35 * @access protected
36 * @param object $a
37 * @param object $b
38 * @return int
39 */
40 function members_priority_sort( $a, $b ) {
41
42 return $a->priority - $b->priority;
43 }
44