| Total Complexity | 65 |
| Total Lines | 546 |
| Duplicated Lines | 0 % |
| Changes | 11 | ||
| Bugs | 0 | Features | 1 |
Complex classes like WPInv_Plugin often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use WPInv_Plugin, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 15 | class WPInv_Plugin { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * GetPaid version. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | public $version; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Data container. |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | protected $data = array(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Form elements instance. |
||
| 33 | * |
||
| 34 | * @var WPInv_Payment_Form_Elements |
||
|
|
|||
| 35 | */ |
||
| 36 | public $form_elements; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param array An array of payment gateways. |
||
| 40 | */ |
||
| 41 | public $gateways; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Class constructor. |
||
| 45 | */ |
||
| 46 | public function __construct() { |
||
| 47 | $this->define_constants(); |
||
| 48 | $this->includes(); |
||
| 49 | $this->init_hooks(); |
||
| 50 | $this->set_properties(); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Sets a custom data property. |
||
| 55 | * |
||
| 56 | * @param string $prop The prop to set. |
||
| 57 | * @param mixed $value The value to retrieve. |
||
| 58 | */ |
||
| 59 | public function set( $prop, $value ) { |
||
| 60 | $this->data[ $prop ] = $value; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Gets a custom data property. |
||
| 65 | * |
||
| 66 | * @param string $prop The prop to set. |
||
| 67 | * @return mixed The value. |
||
| 68 | */ |
||
| 69 | public function get( $prop ) { |
||
| 70 | |||
| 71 | if ( isset( $this->data[ $prop ] ) ) { |
||
| 72 | return $this->data[ $prop ]; |
||
| 73 | } |
||
| 74 | |||
| 75 | return null; |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Define class properties. |
||
| 80 | */ |
||
| 81 | public function set_properties() { |
||
| 82 | |||
| 83 | // Sessions. |
||
| 84 | $this->set( 'session', new WPInv_Session_Handler() ); |
||
| 85 | $GLOBALS['wpi_session'] = $this->get( 'session' ); // Backwards compatibility. |
||
| 86 | $GLOBALS['wpinv_euvat'] = new WPInv_EUVat(); // Backwards compatibility. |
||
| 87 | |||
| 88 | // Init other objects. |
||
| 89 | $this->set( 'session', new WPInv_Session_Handler() ); |
||
| 90 | $this->set( 'notes', new WPInv_Notes() ); |
||
| 91 | $this->set( 'api', new WPInv_API() ); |
||
| 92 | $this->set( 'post_types', new GetPaid_Post_Types() ); |
||
| 93 | $this->set( 'template', new GetPaid_Template() ); |
||
| 94 | $this->set( 'admin', new GetPaid_Admin() ); |
||
| 95 | $this->set( 'subscriptions', new WPInv_Subscriptions() ); |
||
| 96 | $this->set( 'invoice_emails', new GetPaid_Invoice_Notification_Emails() ); |
||
| 97 | $this->set( 'subscription_emails', new GetPaid_Subscription_Notification_Emails() ); |
||
| 98 | $this->set( 'daily_maintenace', new GetPaid_Daily_Maintenance() ); |
||
| 99 | $this->set( 'payment_forms', new GetPaid_Payment_Forms() ); |
||
| 100 | $this->set( 'maxmind', new GetPaid_MaxMind_Geolocation() ); |
||
| 101 | |||
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * Define plugin constants. |
||
| 106 | */ |
||
| 107 | public function define_constants() { |
||
| 108 | define( 'WPINV_PLUGIN_DIR', plugin_dir_path( WPINV_PLUGIN_FILE ) ); |
||
| 109 | define( 'WPINV_PLUGIN_URL', plugin_dir_url( WPINV_PLUGIN_FILE ) ); |
||
| 110 | $this->version = WPINV_VERSION; |
||
| 111 | } |
||
| 112 | |||
| 113 | /** |
||
| 114 | * Hook into actions and filters. |
||
| 115 | * |
||
| 116 | * @since 1.0.19 |
||
| 117 | */ |
||
| 118 | protected function init_hooks() { |
||
| 119 | /* Internationalize the text strings used. */ |
||
| 120 | add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) ); |
||
| 121 | |||
| 122 | // Init the plugin after WordPress inits. |
||
| 123 | add_action( 'init', array( $this, 'init' ), 1 ); |
||
| 124 | add_action( 'init', array( $this, 'maybe_process_ipn' ), 10 ); |
||
| 125 | add_action( 'init', array( $this, 'wpinv_actions' ) ); |
||
| 126 | add_action( 'init', array( $this, 'maybe_do_authenticated_action' ), 100 ); |
||
| 127 | |||
| 128 | if ( class_exists( 'BuddyPress' ) ) { |
||
| 129 | add_action( 'bp_include', array( &$this, 'bp_invoicing_init' ) ); |
||
| 130 | } |
||
| 131 | |||
| 132 | add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 11 ); |
||
| 133 | add_action( 'wp_footer', array( &$this, 'wp_footer' ) ); |
||
| 134 | add_action( 'widgets_init', array( &$this, 'register_widgets' ) ); |
||
| 135 | add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', array( $this, 'wpseo_exclude_from_sitemap_by_post_ids' ) ); |
||
| 136 | add_filter( 'pre_get_posts', array( &$this, 'pre_get_posts' ) ); |
||
| 137 | |||
| 138 | // Fires after registering actions. |
||
| 139 | do_action( 'wpinv_actions', $this ); |
||
| 140 | do_action( 'getpaid_actions', $this ); |
||
| 141 | |||
| 142 | } |
||
| 143 | |||
| 144 | public function plugins_loaded() { |
||
| 153 | } |
||
| 154 | } |
||
| 155 | |||
| 156 | /** |
||
| 157 | * Load the translation of the plugin. |
||
| 158 | * |
||
| 159 | * @since 1.0 |
||
| 160 | */ |
||
| 161 | public function load_textdomain( $locale = NULL ) { |
||
| 176 | } |
||
| 177 | |||
| 178 | /** |
||
| 179 | * Include required core files used in admin and on the frontend. |
||
| 180 | */ |
||
| 181 | public function includes() { |
||
| 182 | |||
| 183 | // Start with the settings. |
||
| 184 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/register-settings.php' ); |
||
| 185 | |||
| 186 | // Packages/libraries. |
||
| 187 | require_once( WPINV_PLUGIN_DIR . 'vendor/autoload.php' ); |
||
| 188 | require_once( WPINV_PLUGIN_DIR . 'vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php' ); |
||
| 189 | |||
| 190 | // Load functions. |
||
| 191 | require_once( WPINV_PLUGIN_DIR . 'includes/deprecated-functions.php' ); |
||
| 192 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-email-functions.php' ); |
||
| 193 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-general-functions.php' ); |
||
| 194 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-helper-functions.php' ); |
||
| 195 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-tax-functions.php' ); |
||
| 196 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-template-functions.php' ); |
||
| 197 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-address-functions.php' ); |
||
| 198 | require_once( WPINV_PLUGIN_DIR . 'includes/invoice-functions.php' ); |
||
| 199 | require_once( WPINV_PLUGIN_DIR . 'includes/subscription-functions.php' ); |
||
| 200 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-item-functions.php' ); |
||
| 201 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-discount-functions.php' ); |
||
| 202 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-gateway-functions.php' ); |
||
| 203 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-payment-functions.php' ); |
||
| 204 | require_once( WPINV_PLUGIN_DIR . 'includes/user-functions.php' ); |
||
| 205 | require_once( WPINV_PLUGIN_DIR . 'includes/error-functions.php' ); |
||
| 206 | |||
| 207 | // Register autoloader. |
||
| 208 | try { |
||
| 209 | spl_autoload_register( array( $this, 'autoload' ), true ); |
||
| 210 | } catch ( Exception $e ) { |
||
| 211 | wpinv_error_log( $e->getMessage(), '', __FILE__, 149, true ); |
||
| 212 | } |
||
| 213 | |||
| 214 | require_once( WPINV_PLUGIN_DIR . 'includes/abstracts/abstract-wpinv-session.php' ); |
||
| 215 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-session-handler.php' ); |
||
| 216 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-ajax.php' ); |
||
| 217 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-api.php' ); |
||
| 218 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-cache-helper.php' ); |
||
| 219 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-db.php' ); |
||
| 220 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/subscriptions.php' ); |
||
| 221 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-subscriptions-db.php' ); |
||
| 222 | require_once( WPINV_PLUGIN_DIR . 'includes/wpinv-subscription.php' ); |
||
| 223 | require_once( WPINV_PLUGIN_DIR . 'includes/abstracts/abstract-wpinv-privacy.php' ); |
||
| 224 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-privacy.php' ); |
||
| 225 | require_once( WPINV_PLUGIN_DIR . 'includes/libraries/class-ayecode-addons.php' ); |
||
| 226 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-addons.php' ); |
||
| 227 | require_once( WPINV_PLUGIN_DIR . 'widgets/checkout.php' ); |
||
| 228 | require_once( WPINV_PLUGIN_DIR . 'widgets/invoice-history.php' ); |
||
| 229 | require_once( WPINV_PLUGIN_DIR . 'widgets/invoice-receipt.php' ); |
||
| 230 | require_once( WPINV_PLUGIN_DIR . 'widgets/invoice-messages.php' ); |
||
| 231 | require_once( WPINV_PLUGIN_DIR . 'widgets/subscriptions.php' ); |
||
| 232 | require_once( WPINV_PLUGIN_DIR . 'widgets/buy-item.php' ); |
||
| 233 | require_once( WPINV_PLUGIN_DIR . 'widgets/getpaid.php' ); |
||
| 234 | |||
| 235 | if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { |
||
| 236 | GetPaid_Post_Types_Admin::init(); |
||
| 237 | |||
| 238 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/wpinv-admin-functions.php' ); |
||
| 239 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/meta-boxes/class-mb-payment-form.php' ); |
||
| 240 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/meta-boxes/class-mb-invoice-notes.php' ); |
||
| 241 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/admin-pages.php' ); |
||
| 242 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/class-wpinv-admin-menus.php' ); |
||
| 243 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/class-wpinv-users.php' ); |
||
| 244 | require_once( WPINV_PLUGIN_DIR . 'includes/admin/class-getpaid-admin-profile.php' ); |
||
| 245 | // load the user class only on the users.php page |
||
| 246 | global $pagenow; |
||
| 247 | if($pagenow=='users.php'){ |
||
| 248 | new WPInv_Admin_Users(); |
||
| 249 | } |
||
| 250 | } |
||
| 251 | |||
| 252 | // Register cli commands |
||
| 253 | if ( defined( 'WP_CLI' ) && WP_CLI ) { |
||
| 254 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-cli.php' ); |
||
| 255 | WP_CLI::add_command( 'invoicing', 'WPInv_CLI' ); |
||
| 256 | } |
||
| 257 | |||
| 258 | } |
||
| 259 | |||
| 260 | /** |
||
| 261 | * Class autoloader |
||
| 262 | * |
||
| 263 | * @param string $class_name The name of the class to load. |
||
| 264 | * @access public |
||
| 265 | * @since 1.0.19 |
||
| 266 | * @return void |
||
| 267 | */ |
||
| 268 | public function autoload( $class_name ) { |
||
| 269 | |||
| 270 | // Normalize the class name... |
||
| 271 | $class_name = strtolower( $class_name ); |
||
| 272 | |||
| 273 | // ... and make sure it is our class. |
||
| 274 | if ( false === strpos( $class_name, 'getpaid_' ) && false === strpos( $class_name, 'wpinv_' ) ) { |
||
| 275 | return; |
||
| 276 | } |
||
| 277 | |||
| 278 | // Next, prepare the file name from the class. |
||
| 279 | $file_name = 'class-' . str_replace( '_', '-', $class_name ) . '.php'; |
||
| 280 | |||
| 281 | // Base path of the classes. |
||
| 282 | $plugin_path = untrailingslashit( WPINV_PLUGIN_DIR ); |
||
| 283 | |||
| 284 | // And an array of possible locations in order of importance. |
||
| 285 | $locations = array( |
||
| 286 | "$plugin_path/includes", |
||
| 287 | "$plugin_path/includes/data-stores", |
||
| 288 | "$plugin_path/includes/gateways", |
||
| 289 | "$plugin_path/includes/payments", |
||
| 290 | "$plugin_path/includes/geolocation", |
||
| 291 | "$plugin_path/includes/reports", |
||
| 292 | "$plugin_path/includes/api", |
||
| 293 | "$plugin_path/includes/admin", |
||
| 294 | "$plugin_path/includes/admin/meta-boxes", |
||
| 295 | ); |
||
| 296 | |||
| 297 | foreach ( apply_filters( 'getpaid_autoload_locations', $locations ) as $location ) { |
||
| 298 | |||
| 299 | if ( file_exists( trailingslashit( $location ) . $file_name ) ) { |
||
| 300 | include trailingslashit( $location ) . $file_name; |
||
| 301 | break; |
||
| 302 | } |
||
| 303 | |||
| 304 | } |
||
| 305 | |||
| 306 | } |
||
| 307 | |||
| 308 | /** |
||
| 309 | * Inits hooks etc. |
||
| 310 | */ |
||
| 311 | public function init() { |
||
| 312 | |||
| 313 | // Fires before getpaid inits. |
||
| 314 | do_action( 'before_getpaid_init', $this ); |
||
| 315 | |||
| 316 | // Maybe upgrade. |
||
| 317 | $this->maybe_upgrade_database(); |
||
| 318 | |||
| 319 | // Load default gateways. |
||
| 320 | $gateways = apply_filters( |
||
| 321 | 'getpaid_default_gateways', |
||
| 322 | array( |
||
| 323 | 'manual' => 'GetPaid_Manual_Gateway', |
||
| 324 | 'paypal' => 'GetPaid_Paypal_Gateway', |
||
| 325 | 'worldpay' => 'GetPaid_Worldpay_Gateway', |
||
| 326 | 'bank_transfer' => 'GetPaid_Bank_Transfer_Gateway', |
||
| 327 | 'authorizenet' => 'GetPaid_Authorize_Net_Gateway', |
||
| 328 | ) |
||
| 329 | ); |
||
| 330 | |||
| 331 | foreach ( $gateways as $id => $class ) { |
||
| 332 | $this->gateways[ $id ] = new $class(); |
||
| 333 | } |
||
| 334 | |||
| 335 | // Fires after getpaid inits. |
||
| 336 | do_action( 'getpaid_init', $this ); |
||
| 337 | |||
| 338 | } |
||
| 339 | |||
| 340 | /** |
||
| 341 | * Checks if this is an IPN request and processes it. |
||
| 342 | */ |
||
| 343 | public function maybe_process_ipn() { |
||
| 344 | |||
| 345 | // Ensure that this is an IPN request. |
||
| 346 | if ( empty( $_GET['wpi-listener'] ) || 'IPN' !== $_GET['wpi-listener'] || empty( $_GET['wpi-gateway'] ) ) { |
||
| 347 | return; |
||
| 348 | } |
||
| 349 | |||
| 350 | $gateway = wpinv_clean( $_GET['wpi-gateway'] ); |
||
| 351 | |||
| 352 | do_action( 'wpinv_verify_payment_ipn', $gateway ); |
||
| 353 | do_action( "wpinv_verify_{$gateway}_ipn" ); |
||
| 354 | exit; |
||
| 355 | |||
| 356 | } |
||
| 357 | |||
| 358 | public function enqueue_scripts() { |
||
| 359 | $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
||
| 360 | |||
| 361 | $version = filemtime( WPINV_PLUGIN_DIR . 'assets/css/invoice-front.css' ); |
||
| 362 | wp_register_style( 'wpinv_front_style', WPINV_PLUGIN_URL . 'assets/css/invoice-front.css', array(), $version ); |
||
| 363 | wp_enqueue_style( 'wpinv_front_style' ); |
||
| 364 | |||
| 365 | // Register scripts |
||
| 366 | wp_register_script( 'jquery-blockui', WPINV_PLUGIN_URL . 'assets/js/jquery.blockUI.min.js', array( 'jquery' ), '2.70', true ); |
||
| 367 | wp_register_script( 'wpinv-front-script', WPINV_PLUGIN_URL . 'assets/js/invoice-front.js', array( 'jquery' ), filemtime( WPINV_PLUGIN_DIR . 'assets/js/invoice-front.js' ), true ); |
||
| 368 | |||
| 369 | $localize = array(); |
||
| 370 | $localize['ajax_url'] = admin_url( 'admin-ajax.php' ); |
||
| 371 | $localize['nonce'] = wp_create_nonce( 'wpinv-nonce' ); |
||
| 372 | $localize['txtComplete'] = __( 'Continue', 'invoicing' ); |
||
| 373 | $localize['UseTaxes'] = wpinv_use_taxes(); |
||
| 374 | $localize['checkoutNonce'] = wp_create_nonce( 'wpinv_checkout_nonce' ); |
||
| 375 | $localize['formNonce'] = wp_create_nonce( 'getpaid_form_nonce' ); |
||
| 376 | $localize['connectionError'] = __( 'Could not establish a connection to the server.', 'invoicing' ); |
||
| 377 | |||
| 378 | $localize = apply_filters( 'wpinv_front_js_localize', $localize ); |
||
| 379 | |||
| 380 | wp_enqueue_script( 'jquery-blockui' ); |
||
| 381 | |||
| 382 | wp_enqueue_style( "select2", WPINV_PLUGIN_URL . 'assets/css/select2/select2.min.css', array(), WPINV_VERSION, 'all' ); |
||
| 383 | wp_enqueue_script('select2', WPINV_PLUGIN_URL . 'assets/js/select2/select2.full' . $suffix . '.js', array( 'jquery' ), WPINV_VERSION ); |
||
| 384 | |||
| 385 | wp_enqueue_script( 'wpinv-front-script' ); |
||
| 386 | wp_localize_script( 'wpinv-front-script', 'WPInv', $localize ); |
||
| 387 | |||
| 388 | $version = filemtime( WPINV_PLUGIN_DIR . 'assets/js/payment-forms.js' ); |
||
| 389 | wp_enqueue_script( 'wpinv-payment-form-script', WPINV_PLUGIN_URL . 'assets/js/payment-forms.js', array( 'wpinv-front-script' ), $version, true ); |
||
| 390 | } |
||
| 391 | |||
| 392 | public function wpinv_actions() { |
||
| 393 | if ( isset( $_REQUEST['wpi_action'] ) ) { |
||
| 394 | do_action( 'wpinv_' . wpinv_sanitize_key( $_REQUEST['wpi_action'] ), $_REQUEST ); |
||
| 395 | } |
||
| 396 | } |
||
| 397 | |||
| 398 | /** |
||
| 399 | * Fires an action after verifying that a user can fire them. |
||
| 400 | * |
||
| 401 | * Note: If the action is on an invoice, subscription etc, esure that the |
||
| 402 | * current user owns the invoice/subscription. |
||
| 403 | */ |
||
| 404 | public function maybe_do_authenticated_action() { |
||
| 415 | |||
| 416 | } |
||
| 417 | |||
| 418 | } |
||
| 419 | |||
| 420 | public function pre_get_posts( $wp_query ) { |
||
| 427 | } |
||
| 428 | |||
| 429 | public function bp_invoicing_init() { |
||
| 430 | require_once( WPINV_PLUGIN_DIR . 'includes/class-wpinv-bp-core.php' ); |
||
| 431 | } |
||
| 432 | |||
| 433 | /** |
||
| 434 | * Register widgets |
||
| 435 | * |
||
| 436 | */ |
||
| 437 | public function register_widgets() { |
||
| 438 | |||
| 439 | // Currently, UX Builder does not work particulaly well with SuperDuper. |
||
| 440 | // So we disable our widgets when editing a page with UX Builder. |
||
| 441 | if ( function_exists( 'ux_builder_is_active' ) && ux_builder_is_active() ) { |
||
| 442 | return; |
||
| 443 | } |
||
| 444 | |||
| 445 | $widgets = apply_filters( |
||
| 446 | 'getpaid_widget_classes', |
||
| 447 | array( |
||
| 448 | 'WPInv_Checkout_Widget', |
||
| 449 | 'WPInv_History_Widget', |
||
| 450 | 'WPInv_Receipt_Widget', |
||
| 451 | 'WPInv_Subscriptions_Widget', |
||
| 452 | 'WPInv_Buy_Item_Widget', |
||
| 453 | 'WPInv_Messages_Widget', |
||
| 454 | 'WPInv_GetPaid_Widget' |
||
| 455 | ) |
||
| 456 | ); |
||
| 457 | |||
| 458 | foreach ( $widgets as $widget ) { |
||
| 459 | register_widget( $widget ); |
||
| 460 | } |
||
| 461 | |||
| 462 | } |
||
| 463 | |||
| 464 | /** |
||
| 465 | * Upgrades the database. |
||
| 466 | * |
||
| 467 | * @since 2.0.2 |
||
| 468 | */ |
||
| 469 | public function maybe_upgrade_database() { |
||
| 493 | } |
||
| 494 | |||
| 495 | } |
||
| 496 | |||
| 497 | } |
||
| 498 | |||
| 499 | /** |
||
| 500 | * Flushes the permalinks if needed. |
||
| 501 | * |
||
| 502 | * @since 2.0.8 |
||
| 503 | */ |
||
| 504 | public function maybe_flush_permalinks() { |
||
| 511 | } |
||
| 512 | |||
| 513 | } |
||
| 514 | |||
| 515 | /** |
||
| 516 | * Remove our pages from yoast sitemaps. |
||
| 517 | * |
||
| 518 | * @since 1.0.19 |
||
| 519 | * @param int[] $excluded_posts_ids |
||
| 520 | */ |
||
| 521 | public function wpseo_exclude_from_sitemap_by_post_ids( $excluded_posts_ids ){ |
||
| 550 | |||
| 551 | } |
||
| 552 | |||
| 553 | public function wp_footer() { |
||
| 573 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths