PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.4.0-beta2
Secure Custom Fields v6.4.0-beta2
6.9.5 6.9.4 6.9.3 6.9.2 6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / locations / abstract-acf-legacy-location.php
secure-custom-fields / includes / locations Last commit date
abstract-acf-legacy-location.php 1 year ago abstract-acf-location.php 1 year ago class-acf-location-attachment.php 1 year ago class-acf-location-comment.php 1 year ago class-acf-location-current-user-role.php 1 year ago class-acf-location-current-user.php 1 year ago class-acf-location-nav-menu-item.php 1 year ago class-acf-location-nav-menu.php 1 year ago class-acf-location-page-parent.php 1 year ago class-acf-location-page-template.php 1 year ago class-acf-location-page-type.php 1 year ago class-acf-location-page.php 1 year ago class-acf-location-post-category.php 1 year ago class-acf-location-post-format.php 1 year ago class-acf-location-post-status.php 1 year ago class-acf-location-post-taxonomy.php 1 year ago class-acf-location-post-template.php 1 year ago class-acf-location-post-type.php 1 year ago class-acf-location-post.php 1 year ago class-acf-location-taxonomy.php 1 year ago class-acf-location-user-form.php 1 year ago class-acf-location-user-role.php 1 year ago class-acf-location-widget.php 1 year ago index.php 1 year ago
abstract-acf-legacy-location.php
64 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 if ( ! class_exists( 'ACF_Legacy_Location' ) ) :
8 abstract class ACF_Legacy_Location {
9
10 /**
11 * Constructor.
12 *
13 * @date 5/03/2014
14 * @since 5.0.0
15 *
16 * @param void
17 * @return void
18 */
19 public function __construct() {
20
21 // Add legacy method filters.
22 if ( method_exists( $this, 'rule_match' ) ) {
23 add_filter( "acf/location/rule_match/{$this->name}", array( $this, 'rule_match' ), 5, 3 );
24 }
25 if ( method_exists( $this, 'rule_operators' ) ) {
26 add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 );
27 }
28 if ( method_exists( $this, 'rule_values' ) ) {
29 add_filter( "acf/location/rule_values/{$this->name}", array( $this, 'rule_values' ), 5, 2 );
30 }
31 }
32
33 /**
34 * Magic __call method for backwards compatibility.
35 *
36 * @date 10/4/20
37 * @since 5.9.0
38 *
39 * @param string $name The method name.
40 * @param array $arguments The array of arguments.
41 * @return mixed
42 */
43 public function __call( $name, $arguments ) {
44
45 // Add backwards compatibility for legacy methods.
46 // - Combine 3x legacy filters cases together (remove first args).
47 switch ( $name ) {
48 case 'rule_match':
49 $method = isset( $method ) ? $method : 'match';
50 $arguments[3] = isset( $arguments[3] ) ? $arguments[3] : false; // Add $field_group param.
51 case 'rule_operators':
52 $method = isset( $method ) ? $method : 'get_operators';
53 case 'rule_values':
54 $method = isset( $method ) ? $method : 'get_values';
55 array_shift( $arguments );
56 return call_user_func_array( array( $this, $method ), $arguments );
57 case 'compare':
58 return call_user_func_array( array( $this, 'compare_to_rule' ), $arguments );
59 }
60 }
61 }
62
63 endif; // class_exists check
64