log_deprecated_notice( 'filter:jp_cc_registered_conditions', '2.0.0', 'filter:content_control/rule_engine/deprecated_rules' ); /** * Filter the registered conditions. * * @deprecated 2.0.0 * * @param boolean $conditions Registered conditions. */ return apply_filters( 'jp_cc_registered_conditions', $conditions ); } return $conditions; }, 9 ); add_filter( 'content_control/user_roles', function ( $roles ) { if ( has_filter( 'jp_cc_user_roles' ) ) { plugin( 'logging' )->log_deprecated_notice( 'filter:jp_cc_user_roles', '2.0.0', 'filter:content_control/user_roles' ); /** * Filter the user roles that our plugin should consider. * * @deprecated 2.0.0 * * @param array $roles Roles that our plugin should consider. */ return apply_filters( 'jp_cc_user_roles', $roles ); } return $roles; }, 9 ); add_filter( 'content_control/restricted_post_content', function ( $message ) { if ( has_filter( 'jp_cc_restricted_message' ) ) { plugin( 'logging' )->log_deprecated_notice( 'filter:jp_cc_restricted_message', '2.0.0', 'filter:content_control/restricted_post_content' ); /** * Filter the restricted message. * * @deprecated 2.0.0 * * @param string $message */ return apply_filters( 'jp_cc_restricted_message', $message ); } return $message; }, 9 ); add_filter( 'content_control/should_exclude_widget', function ( $should_exclude ) { if ( has_filter( 'jp_cc_should_exclude_widget' ) ) { plugin( 'logging' )->log_deprecated_notice( 'filter:jp_cc_should_exclude_widget', '2.0.0', 'filter:content_control/should_exclude_widget' ); /** * Filter if the widget should be excluded. * * @deprecated 2.0.0 * * @param boolean $should_exclude */ return apply_filters( 'jp_cc_should_exclude_widget', $should_exclude ); } return $should_exclude; }, 9 ); add_filter( 'content_control/excerpt_length', function ( $length = 50 ) { if ( has_filter( 'jp_cc_filter_excerpt_length' ) ) { plugin( 'logging' )->log_deprecated_notice( 'filter:jp_cc_filter_excerpt_length', '2.0.0', 'filter:content_control/excerpt_length' ); /** * Filter the excerpt length. * * @deprecated 2.0.0 * * @param array $settings */ return apply_filters( 'jp_cc_filter_excerpt_length', $length ); } return $length; }, 9 );