PluginProbe
Bogo / 3.9
Bogo v3.9
3.9.3 trunk 1.0 1.1 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.6 2.6.1 2.7 2.8 2.8.1 2.9 3.0 3.0.1 All 52 releases
bogo / includes / functions.php

functions.php in Bogo 3.9, at includes/functions.php

51 lines 797 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function bogo_get_prop( $prop ) {
4 $option = get_option( 'bogo' );
5
6 if ( ! is_array( $option ) ) {
7 $option = array();
8 }
9
10 return $option[$prop] ?? '';
11 }
12
13
14 function bogo_set_prop( $prop, $value ) {
15 $option = get_option( 'bogo' );
16
17 if ( ! is_array( $option ) ) {
18 $option = array();
19 }
20
21 $option[$prop] = $value;
22
23 update_option( 'bogo', $option );
24 }
25
26
27 function bogo_delete_prop( $prop ) {
28 $option = get_option( 'bogo' );
29
30 if ( ! is_array( $option ) ) {
31 $option = array();
32 }
33
34 if ( isset( $option[$prop] ) ) {
35 unset( $option[$prop] );
36 }
37
38 update_option( 'bogo', $option );
39 }
40
41
42 function bogo_plugin_url( $path = '' ) {
43 $url = plugins_url( $path, BOGO_PLUGIN );
44
45 if ( is_ssl() and 'http:' === substr( $url, 0, 5 ) ) {
46 $url = 'https:' . substr( $url, 5 );
47 }
48
49 return $url;
50 }
51