PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.4.1-beta7
Secure Custom Fields v6.4.1-beta7
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-block.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-options-page.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
63 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 ACF 5.0.0
15 *
16 * @return void
17 */
18 public function __construct() {
19
20 // Add legacy method filters.
21 if ( method_exists( $this, 'rule_match' ) ) {
22 add_filter( "acf/location/rule_match/{$this->name}", array( $this, 'rule_match' ), 5, 3 );
23 }
24 if ( method_exists( $this, 'rule_operators' ) ) {
25 add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 );
26 }
27 if ( method_exists( $this, 'rule_values' ) ) {
28 add_filter( "acf/location/rule_values/{$this->name}", array( $this, 'rule_values' ), 5, 2 );
29 }
30 }
31
32 /**
33 * Magic __call method for backwards compatibility.
34 *
35 * @date 10/4/20
36 * @since ACF 5.9.0
37 *
38 * @param string $name The method name.
39 * @param array $arguments The array of arguments.
40 * @return mixed
41 */
42 public function __call( $name, $arguments ) {
43
44 // Add backwards compatibility for legacy methods.
45 // - Combine 3x legacy filters cases together (remove first args).
46 switch ( $name ) {
47 case 'rule_match':
48 $method = isset( $method ) ? $method : 'match';
49 $arguments[3] = isset( $arguments[3] ) ? $arguments[3] : false; // Add $field_group param.
50 case 'rule_operators':
51 $method = isset( $method ) ? $method : 'get_operators';
52 case 'rule_values':
53 $method = isset( $method ) ? $method : 'get_values';
54 array_shift( $arguments );
55 return call_user_func_array( array( $this, $method ), $arguments );
56 case 'compare':
57 return call_user_func_array( array( $this, 'compare_to_rule' ), $arguments );
58 }
59 }
60 }
61
62 endif; // class_exists check
63