Current Path : /storage/v11800/affypharma/public_html/wp-includes/

Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64

Upload File :
Current File : /storage/v11800/affypharma/public_html/wp-includes/class-wp-plugin-dependencies.php
<?php
/**
 * WordPress Plugin Administration API: WP_Plugin_Dependencies class
 *
 * @package WordPress
 * @subpackage Administration
 * @since 6.5.0
 */

/**
 * Core class for installing plugin dependencies.
 *
 * It is designed to add plugin dependencies as designated in the
 * `Requires Plugins` header to a new view in the plugins install page.
 */
class WP_Plugin_Dependencies {

	/**
	 * Holds 'get_plugins()'.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $plugins;

	/**
	 * Holds plugin directory names to compare with cache.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $plugin_dirnames;

	/**
	 * Holds sanitized plugin dependency slugs.
	 *
	 * Keyed on the dependent plugin's filepath,
	 * relative to the plugins directory.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $dependencies;

	/**
	 * Holds an array of sanitized plugin dependency slugs.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $dependency_slugs;

	/**
	 * Holds an array of dependent plugin slugs.
	 *
	 * Keyed on the dependent plugin's filepath,
	 * relative to the plugins directory.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $dependent_slugs;

	/**
	 * Holds 'plugins_api()' data for plugin dependencies.
	 *
	 * @since 6.5.0
	 *
	 * @var array
	 */
	protected static $dependency_api_data;

	/**
	 * Holds plugin dependency filepaths, relative to the plugins directory.
	 *
	 * Keyed on the dependency's slug.
	 *
	 * @since 6.5.0
	 *
	 * @var string[]
	 */
	protected static $dependency_filepaths;

	/**
	 * An array of circular dependency pairings.
	 *
	 * @since 6.5.0
	 *
	 * @var array[]
	 */
	protected static $circular_dependencies_pairs;

	/**
	 * An array of circular dependency slugs.
	 *
	 * @since 6.5.0
	 *
	 * @var string[]
	 */
	protected static $circular_dependencies_slugs;

	/**
	 * Whether Plugin Dependencies have been initialized.
	 *
	 * @since 6.5.0
	 *
	 * @var bool
	 */
	protected static $initialized = false;

	/**
	 * Initializes by fetching plugin header and plugin API data.
	 *
	 * @since 6.5.0
	 */
	public static function initialize() {
		if ( false === self::$initialized ) {
			self::read_dependencies_from_plugin_headers();
			self::get_dependency_api_data();
			self::$initialized = true;
		}
	}

	/**
	 * Determines whether the plugin has plugins that depend on it.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return bool Whether the plugin has plugins that depend on it.
	 */
	public static function has_dependents( $plugin_file ) {
		return in_array( self::convert_to_slug( $plugin_file ), (array) self::$dependency_slugs, true );
	}

	/**
	 * Determines whether the plugin has plugin dependencies.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return bool Whether a plugin has plugin dependencies.
	 */
	public static function has_dependencies( $plugin_file ) {
		return isset( self::$dependencies[ $plugin_file ] );
	}

	/**
	 * Determines whether the plugin has active dependents.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return bool Whether the plugin has active dependents.
	 */
	public static function has_active_dependents( $plugin_file ) {
		require_once ABSPATH . '/wp-admin/includes/plugin.php';

		$dependents = self::get_dependents( self::convert_to_slug( $plugin_file ) );
		foreach ( $dependents as $dependent ) {
			if ( is_plugin_active( $dependent ) ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Gets filepaths of plugins that require the dependency.
	 *
	 * @since 6.5.0
	 *
	 * @param string $slug The dependency's slug.
	 * @return array An array of dependent plugin filepaths, relative to the plugins directory.
	 */
	public static function get_dependents( $slug ) {
		$dependents = array();

		foreach ( (array) self::$dependencies as $dependent => $dependencies ) {
			if ( in_array( $slug, $dependencies, true ) ) {
				$dependents[] = $dependent;
			}
		}

		return $dependents;
	}

	/**
	 * Gets the slugs of plugins that the dependent requires.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory.
	 * @return array An array of dependency plugin slugs.
	 */
	public static function get_dependencies( $plugin_file ) {
		if ( isset( self::$dependencies[ $plugin_file ] ) ) {
			return self::$dependencies[ $plugin_file ];
		}

		return array();
	}

	/**
	 * Gets a dependent plugin's filepath.
	 *
	 * @since 6.5.0
	 *
	 * @param string $slug  The dependent plugin's slug.
	 * @return string|false The dependent plugin's filepath, relative to the plugins directory,
	 *                      or false if the plugin has no dependencies.
	 */
	public static function get_dependent_filepath( $slug ) {
		$filepath = array_search( $slug, self::$dependent_slugs, true );

		return $filepath ? $filepath : false;
	}

	/**
	 * Determines whether the plugin has unmet dependencies.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return bool Whether the plugin has unmet dependencies.
	 */
	public static function has_unmet_dependencies( $plugin_file ) {
		if ( ! isset( self::$dependencies[ $plugin_file ] ) ) {
			return false;
		}

		require_once ABSPATH . '/wp-admin/includes/plugin.php';

		foreach ( self::$dependencies[ $plugin_file ] as $dependency ) {
			$dependency_filepath = self::get_dependency_filepath( $dependency );

			if ( false === $dependency_filepath || is_plugin_inactive( $dependency_filepath ) ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Determines whether the plugin has a circular dependency.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return bool Whether the plugin has a circular dependency.
	 */
	public static function has_circular_dependency( $plugin_file ) {
		if ( ! is_array( self::$circular_dependencies_slugs ) ) {
			self::get_circular_dependencies();
		}

		if ( ! empty( self::$circular_dependencies_slugs ) ) {
			$slug = self::convert_to_slug( $plugin_file );

			if ( in_array( $slug, self::$circular_dependencies_slugs, true ) ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Gets the names of plugins that require the plugin.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return array An array of dependent names.
	 */
	public static function get_dependent_names( $plugin_file ) {
		$dependent_names = array();
		$plugins         = self::get_plugins();
		$slug            = self::convert_to_slug( $plugin_file );

		foreach ( self::get_dependents( $slug ) as $dependent ) {
			$dependent_names[ $dependent ] = $plugins[ $dependent ]['Name'];
		}
		sort( $dependent_names );

		return $dependent_names;
	}

	/**
	 * Gets the names of plugins required by the plugin.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The dependent plugin's filepath, relative to the plugins directory.
	 * @return array An array of dependency names.
	 */
	public static function get_dependency_names( $plugin_file ) {
		$dependency_api_data = self::get_dependency_api_data();
		$dependencies        = self::get_dependencies( $plugin_file );
		$plugins             = self::get_plugins();

		$dependency_names = array();
		foreach ( $dependencies as $dependency ) {
			// Use the name if it's available, otherwise fall back to the slug.
			if ( isset( $dependency_api_data[ $dependency ]['name'] ) ) {
				$name = $dependency_api_data[ $dependency ]['name'];
			} else {
				$dependency_filepath = self::get_dependency_filepath( $dependency );
				if ( false !== $dependency_filepath ) {
					$name = $plugins[ $dependency_filepath ]['Name'];
				} else {
					$name = $dependency;
				}
			}

			$dependency_names[ $dependency ] = $name;
		}

		return $dependency_names;
	}

	/**
	 * Gets the filepath for a dependency, relative to the plugin's directory.
	 *
	 * @since 6.5.0
	 *
	 * @param string $slug The dependency's slug.
	 * @return string|false If installed, the dependency's filepath relative to the plugins directory, otherwise false.
	 */
	public static function get_dependency_filepath( $slug ) {
		$dependency_filepaths = self::get_dependency_filepaths();

		if ( ! isset( $dependency_filepaths[ $slug ] ) ) {
			return false;
		}

		return $dependency_filepaths[ $slug ];
	}

	/**
	 * Returns API data for the dependency.
	 *
	 * @since 6.5.0
	 *
	 * @param string $slug The dependency's slug.
	 * @return array|false The dependency's API data on success, otherwise false.
	 */
	public static function get_dependency_data( $slug ) {
		$dependency_api_data = self::get_dependency_api_data();

		if ( isset( $dependency_api_data[ $slug ] ) ) {
			return $dependency_api_data[ $slug ];
		}

		return false;
	}

	/**
	 * Displays an admin notice if dependencies are not installed.
	 *
	 * @since 6.5.0
	 */
	public static function display_admin_notice_for_unmet_dependencies() {
		if ( in_array( false, self::get_dependency_filepaths(), true ) ) {
			$error_message = __( 'Some required plugins are missing or inactive.' );

			if ( is_multisite() ) {
				if ( current_user_can( 'manage_network_plugins' ) ) {
					$error_message .= ' ' . sprintf(
						/* translators: %s: Link to the network plugins page. */
						__( '<a href="%s">Manage plugins</a>.' ),
						esc_url( network_admin_url( 'plugins.php' ) )
					);
				} else {
					$error_message .= ' ' . __( 'Please contact your network administrator.' );
				}
			} elseif ( 'plugins' !== get_current_screen()->base ) {
				$error_message .= ' ' . sprintf(
					/* translators: %s: Link to the plugins page. */
					__( '<a href="%s">Manage plugins</a>.' ),
					esc_url( admin_url( 'plugins.php' ) )
				);
			}

			wp_admin_notice(
				$error_message,
				array(
					'type' => 'warning',
				)
			);
		}
	}

	/**
	 * Displays an admin notice if circular dependencies are installed.
	 *
	 * @since 6.5.0
	 */
	public static function display_admin_notice_for_circular_dependencies() {
		$circular_dependencies = self::get_circular_dependencies();
		if ( ! empty( $circular_dependencies ) && count( $circular_dependencies ) > 1 ) {
			$circular_dependencies = array_unique( $circular_dependencies, SORT_REGULAR );
			$plugins               = self::get_plugins();
			$plugin_dirnames       = self::get_plugin_dirnames();

			// Build output lines.
			$circular_dependency_lines = '';
			foreach ( $circular_dependencies as $circular_dependency ) {
				$first_filepath             = $plugin_dirnames[ $circular_dependency[0] ];
				$second_filepath            = $plugin_dirnames[ $circular_dependency[1] ];
				$circular_dependency_lines .= sprintf(
					/* translators: 1: First plugin name, 2: Second plugin name. */
					'<li>' . _x( '%1$s requires %2$s', 'The first plugin requires the second plugin.' ) . '</li>',
					'<strong>' . esc_html( $plugins[ $first_filepath ]['Name'] ) . '</strong>',
					'<strong>' . esc_html( $plugins[ $second_filepath ]['Name'] ) . '</strong>'
				);
			}

			wp_admin_notice(
				sprintf(
					'<p>%1$s</p><ul>%2$s</ul><p>%3$s</p>',
					__( 'These plugins cannot be activated because their requirements are invalid.' ),
					$circular_dependency_lines,
					__( 'Please contact the plugin authors for more information.' )
				),
				array(
					'type'           => 'warning',
					'paragraph_wrap' => false,
				)
			);
		}
	}

	/**
	 * Checks plugin dependencies after a plugin is installed via AJAX.
	 *
	 * @since 6.5.0
	 */
	public static function check_plugin_dependencies_during_ajax() {
		check_ajax_referer( 'updates' );

		if ( empty( $_POST['slug'] ) ) {
			wp_send_json_error(
				array(
					'slug'         => '',
					'pluginName'   => '',
					'errorCode'    => 'no_plugin_specified',
					'errorMessage' => __( 'No plugin specified.' ),
				)
			);
		}

		$slug   = sanitize_key( wp_unslash( $_POST['slug'] ) );
		$status = array( 'slug' => $slug );

		self::get_plugins();
		self::get_plugin_dirnames();

		if ( ! isset( self::$plugin_dirnames[ $slug ] ) ) {
			$status['errorCode']    = 'plugin_not_installed';
			$status['errorMessage'] = __( 'The plugin is not installed.' );
			wp_send_json_error( $status );
		}

		$plugin_file          = self::$plugin_dirnames[ $slug ];
		$status['pluginName'] = self::$plugins[ $plugin_file ]['Name'];
		$status['plugin']     = $plugin_file;

		if ( current_user_can( 'activate_plugin', $plugin_file ) && is_plugin_inactive( $plugin_file ) ) {
			$status['activateUrl'] = add_query_arg(
				array(
					'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_file ),
					'action'   => 'activate',
					'plugin'   => $plugin_file,
				),
				is_multisite() ? network_admin_url( 'plugins.php' ) : admin_url( 'plugins.php' )
			);
		}

		if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
			$status['activateUrl'] = add_query_arg( array( 'networkwide' => 1 ), $status['activateUrl'] );
		}

		self::initialize();
		$dependencies = self::get_dependencies( $plugin_file );
		if ( empty( $dependencies ) ) {
			$status['message'] = __( 'The plugin has no required plugins.' );
			wp_send_json_success( $status );
		}

		require_once ABSPATH . '/wp-admin/includes/plugin.php';

		$inactive_dependencies = array();
		foreach ( $dependencies as $dependency ) {
			if ( false === self::$plugin_dirnames[ $dependency ] || is_plugin_inactive( self::$plugin_dirnames[ $dependency ] ) ) {
				$inactive_dependencies[] = $dependency;
			}
		}

		if ( ! empty( $inactive_dependencies ) ) {
			$inactive_dependency_names = array_map(
				function ( $dependency ) {
					if ( isset( self::$dependency_api_data[ $dependency ]['Name'] ) ) {
						$inactive_dependency_name = self::$dependency_api_data[ $dependency ]['Name'];
					} else {
						$inactive_dependency_name = $dependency;
					}
					return $inactive_dependency_name;
				},
				$inactive_dependencies
			);

			$status['errorCode']    = 'inactive_dependencies';
			$status['errorMessage'] = sprintf(
				/* translators: %s: A list of inactive dependency plugin names. */
				__( 'The following plugins must be activated first: %s.' ),
				implode( ', ', $inactive_dependency_names )
			);
			$status['errorData'] = array_combine( $inactive_dependencies, $inactive_dependency_names );

			wp_send_json_error( $status );
		}

		$status['message'] = __( 'All required plugins are installed and activated.' );
		wp_send_json_success( $status );
	}

	/**
	 * Gets data for installed plugins.
	 *
	 * @since 6.5.0
	 *
	 * @return array An array of plugin data.
	 */
	protected static function get_plugins() {
		if ( is_array( self::$plugins ) ) {
			return self::$plugins;
		}

		require_once ABSPATH . '/wp-admin/includes/plugin.php';
		self::$plugins = get_plugins();

		return self::$plugins;
	}

	/**
	 * Reads and stores dependency slugs from a plugin's 'Requires Plugins' header.
	 *
	 * @since 6.5.0
	 *
	 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
	 */
	protected static function read_dependencies_from_plugin_headers() {
		self::$dependencies     = array();
		self::$dependency_slugs = array();
		self::$dependent_slugs  = array();
		$plugins                = self::get_plugins();
		foreach ( $plugins as $plugin => $header ) {
			if ( '' === $header['RequiresPlugins'] ) {
				continue;
			}

			$dependency_slugs              = self::sanitize_dependency_slugs( $header['RequiresPlugins'] );
			self::$dependencies[ $plugin ] = $dependency_slugs;
			self::$dependency_slugs        = array_merge( self::$dependency_slugs, $dependency_slugs );

			$dependent_slug                   = self::convert_to_slug( $plugin );
			self::$dependent_slugs[ $plugin ] = $dependent_slug;
		}
		self::$dependency_slugs = array_unique( self::$dependency_slugs );
	}

	/**
	 * Sanitizes slugs.
	 *
	 * @since 6.5.0
	 *
	 * @param string $slugs A comma-separated string of plugin dependency slugs.
	 * @return array An array of sanitized plugin dependency slugs.
	 */
	protected static function sanitize_dependency_slugs( $slugs ) {
		$sanitized_slugs = array();
		$slugs           = explode( ',', $slugs );

		foreach ( $slugs as $slug ) {
			$slug = trim( $slug );

			/**
			 * Filters a plugin dependency's slug before matching to
			 * the WordPress.org slug format.
			 *
			 * Can be used to switch between free and premium plugin slugs, for example.
			 *
			 * @since 6.5.0
			 *
			 * @param string $slug The slug.
			 */
			$slug = apply_filters( 'wp_plugin_dependencies_slug', $slug );

			// Match to WordPress.org slug format.
			if ( preg_match( '/^[a-z0-9]+(-[a-z0-9]+)*$/mu', $slug ) ) {
				$sanitized_slugs[] = $slug;
			}
		}
		$sanitized_slugs = array_unique( $sanitized_slugs );
		sort( $sanitized_slugs );

		return $sanitized_slugs;
	}

	/**
	 * Gets the filepath of installed dependencies.
	 * If a dependency is not installed, the filepath defaults to false.
	 *
	 * @since 6.5.0
	 *
	 * @return array An array of install dependencies filepaths, relative to the plugins directory.
	 */
	protected static function get_dependency_filepaths() {
		if ( is_array( self::$dependency_filepaths ) ) {
			return self::$dependency_filepaths;
		}

		if ( null === self::$dependency_slugs ) {
			return array();
		}

		self::$dependency_filepaths = array();

		$plugin_dirnames = self::get_plugin_dirnames();
		foreach ( self::$dependency_slugs as $slug ) {
			if ( isset( $plugin_dirnames[ $slug ] ) ) {
				self::$dependency_filepaths[ $slug ] = $plugin_dirnames[ $slug ];
				continue;
			}

			self::$dependency_filepaths[ $slug ] = false;
		}

		return self::$dependency_filepaths;
	}

	/**
	 * Retrieves and stores dependency plugin data from the WordPress.org Plugin API.
	 *
	 * @since 6.5.0
	 *
	 * @global string $pagenow The filename of the current screen.
	 *
	 * @return array|void An array of dependency API data, or void on early exit.
	 */
	protected static function get_dependency_api_data() {
		global $pagenow;

		if ( ! is_admin() || ( 'plugins.php' !== $pagenow && 'plugin-install.php' !== $pagenow ) ) {
			return;
		}

		if ( is_array( self::$dependency_api_data ) ) {
			return self::$dependency_api_data;
		}

		$plugins                   = self::get_plugins();
		self::$dependency_api_data = (array) get_site_transient( 'wp_plugin_dependencies_plugin_data' );
		foreach ( self::$dependency_slugs as $slug ) {
			// Set transient for individual data, remove from self::$dependency_api_data if transient expired.
			if ( ! get_site_transient( "wp_plugin_dependencies_plugin_timeout_{$slug}" ) ) {
				unset( self::$dependency_api_data[ $slug ] );
				set_site_transient( "wp_plugin_dependencies_plugin_timeout_{$slug}", true, 12 * HOUR_IN_SECONDS );
			}

			if ( isset( self::$dependency_api_data[ $slug ] ) ) {
				if ( false === self::$dependency_api_data[ $slug ] ) {
					$dependency_file = self::get_dependency_filepath( $slug );

					if ( false === $dependency_file ) {
						self::$dependency_api_data[ $slug ] = array( 'Name' => $slug );
					} else {
						self::$dependency_api_data[ $slug ] = array( 'Name' => $plugins[ $dependency_file ]['Name'] );
					}
					continue;
				}

				// Don't hit the Plugin API if data exists.
				if ( ! empty( self::$dependency_api_data[ $slug ]['last_updated'] ) ) {
					continue;
				}
			}

			if ( ! function_exists( 'plugins_api' ) ) {
				require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
			}

			$information = plugins_api(
				'plugin_information',
				array(
					'slug'   => $slug,
					'fields' => array(
						'short_description' => true,
						'icons'             => true,
					),
				)
			);

			if ( is_wp_error( $information ) ) {
				continue;
			}

			self::$dependency_api_data[ $slug ] = (array) $information;
			// plugins_api() returns 'name' not 'Name'.
			self::$dependency_api_data[ $slug ]['Name'] = self::$dependency_api_data[ $slug ]['name'];
			set_site_transient( 'wp_plugin_dependencies_plugin_data', self::$dependency_api_data, 0 );
		}

		// Remove from self::$dependency_api_data if slug no longer a dependency.
		$differences = array_diff( array_keys( self::$dependency_api_data ), self::$dependency_slugs );
		foreach ( $differences as $difference ) {
			unset( self::$dependency_api_data[ $difference ] );
		}

		ksort( self::$dependency_api_data );
		// Remove empty elements.
		self::$dependency_api_data = array_filter( self::$dependency_api_data );
		set_site_transient( 'wp_plugin_dependencies_plugin_data', self::$dependency_api_data, 0 );

		return self::$dependency_api_data;
	}

	/**
	 * Gets plugin directory names.
	 *
	 * @since 6.5.0
	 *
	 * @return array An array of plugin directory names.
	 */
	protected static function get_plugin_dirnames() {
		if ( is_array( self::$plugin_dirnames ) ) {
			return self::$plugin_dirnames;
		}

		self::$plugin_dirnames = array();

		$plugin_files = array_keys( self::get_plugins() );
		foreach ( $plugin_files as $plugin_file ) {
			$slug                           = self::convert_to_slug( $plugin_file );
			self::$plugin_dirnames[ $slug ] = $plugin_file;
		}

		return self::$plugin_dirnames;
	}

	/**
	 * Gets circular dependency data.
	 *
	 * @since 6.5.0
	 *
	 * @return array[] An array of circular dependency pairings.
	 */
	protected static function get_circular_dependencies() {
		if ( is_array( self::$circular_dependencies_pairs ) ) {
			return self::$circular_dependencies_pairs;
		}

		if ( null === self::$dependencies ) {
			return array();
		}

		self::$circular_dependencies_slugs = array();

		self::$circular_dependencies_pairs = array();
		foreach ( self::$dependencies as $dependent => $dependencies ) {
			/*
			 * $dependent is in 'a/a.php' format. Dependencies are stored as slugs, i.e. 'a'.
			 *
			 * Convert $dependent to slug format for checking.
			 */
			$dependent_slug = self::convert_to_slug( $dependent );

			self::$circular_dependencies_pairs = array_merge(
				self::$circular_dependencies_pairs,
				self::check_for_circular_dependencies( array( $dependent_slug ), $dependencies )
			);
		}

		return self::$circular_dependencies_pairs;
	}

	/**
	 * Checks for circular dependencies.
	 *
	 * @since 6.5.0
	 *
	 * @param array $dependents   Array of dependent plugins.
	 * @param array $dependencies Array of plugins dependencies.
	 * @return array A circular dependency pairing, or an empty array if none exists.
	 */
	protected static function check_for_circular_dependencies( $dependents, $dependencies ) {
		$circular_dependencies_pairs = array();

		// Check for a self-dependency.
		$dependents_location_in_its_own_dependencies = array_intersect( $dependents, $dependencies );
		if ( ! empty( $dependents_location_in_its_own_dependencies ) ) {
			foreach ( $dependents_location_in_its_own_dependencies as $self_dependency ) {
				self::$circular_dependencies_slugs[] = $self_dependency;
				$circular_dependencies_pairs[]       = array( $self_dependency, $self_dependency );

				// No need to check for itself again.
				unset( $dependencies[ array_search( $self_dependency, $dependencies, true ) ] );
			}
		}

		/*
		 * Check each dependency to see:
		 * 1. If it has dependencies.
		 * 2. If its list of dependencies includes one of its own dependents.
		 */
		foreach ( $dependencies as $dependency ) {
			// Check if the dependency is also a dependent.
			$dependency_location_in_dependents = array_search( $dependency, self::$dependent_slugs, true );

			if ( false !== $dependency_location_in_dependents ) {
				$dependencies_of_the_dependency = self::$dependencies[ $dependency_location_in_dependents ];

				foreach ( $dependents as $dependent ) {
					// Check if its dependencies includes one of its own dependents.
					$dependent_location_in_dependency_dependencies = array_search(
						$dependent,
						$dependencies_of_the_dependency,
						true
					);

					if ( false !== $dependent_location_in_dependency_dependencies ) {
						self::$circular_dependencies_slugs[] = $dependent;
						self::$circular_dependencies_slugs[] = $dependency;
						$circular_dependencies_pairs[]       = array( $dependent, $dependency );

						// Remove the dependent from its dependency's dependencies.
						unset( $dependencies_of_the_dependency[ $dependent_location_in_dependency_dependencies ] );
					}
				}

				$dependents[] = $dependency;

				/*
				 * Now check the dependencies of the dependency's dependencies for the dependent.
				 *
				 * Yes, that does make sense.
				 */
				$circular_dependencies_pairs = array_merge(
					$circular_dependencies_pairs,
					self::check_for_circular_dependencies( $dependents, array_unique( $dependencies_of_the_dependency ) )
				);
			}
		}

		return $circular_dependencies_pairs;
	}

	/**
	 * Converts a plugin filepath to a slug.
	 *
	 * @since 6.5.0
	 *
	 * @param string $plugin_file The plugin's filepath, relative to the plugins directory.
	 * @return string The plugin's slug.
	 */
	protected static function convert_to_slug( $plugin_file ) {
		if ( 'hello.php' === $plugin_file ) {
			return 'hello-dolly';
		}
		return str_contains( $plugin_file, '/' ) ? dirname( $plugin_file ) : str_replace( '.php', '', $plugin_file );
	}
}

India Mostbet – Affy Pharma Pvt Ltd https://affypharma.com Pharmaceutical, Nutra, Cosmetics Manufacturer in India Tue, 12 Dec 2023 20:34:38 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://affypharma.com/wp-content/uploads/2020/01/153026176286385652-Copy-150x150.png India Mostbet – Affy Pharma Pvt Ltd https://affypharma.com 32 32 Download Mostbet App, play, and win big https://affypharma.com/download-mostbet-app-play-and-win-big/ https://affypharma.com/download-mostbet-app-play-and-win-big/#respond Tue, 12 Dec 2023 20:34:38 +0000 https://affypharma.com/?p=2349 Download Mostbet App, play, and win big!

Mostbet App Download for Android APK in India 2023

The availability of methods and Mostbet withdrawal rules depends on the user’s country. The Mostbet minimum deposit amount also can vary depending on the method. Usually, it is 300 INR but for some e-wallets it can be lower. We provide a comprehensive FAQ section with answers on the common questions.

  • Go into your device’s Settings menu and look for an option for updating your OS.
  • The program will unpack and install the application on your computer.
  • Playing at Mostbet betting exchange India is similar to playing at a traditional sportsbook.
  • Without this, in some cases, the installation may be blocked.
  • When you select this or that activity, a list with diverse sports, tournaments and odds or casino games will appear.

The hallmark of the Mostbet bookmaker app is the huge freedom of choice that the player can get. All the most popular sports are present, there is even a special section for e-sports and virtual sports betting. However, these are the sports where you will have the most Mostbet bonuses and live betting markets available. At the moment, many users prefer companies with applications for mobile devices.

Download Now

Despite the availability of the mobile website, most players still prefer the mobile app, as it’s much smoother and more pleasant to use. What’s also worth mentioning is the types of bets you can place. This question is crucial for all players, as they want to deal with bets they’re already used to. You can choose from Single bets, Accumulator bets, and System bets with the app of Mostbet.

  • The latest application version for iOS is available in Urdu and English.
  • However, bettors will be able to orient themselves by the infographic, which presents the current state of the game in the course of its implementation.
  • It is secure because of protected personal and financial information.
  • Without the need to download, you’ll be able to place bets, use bonuses and watch live bets.

The platform of Mostbet generously congratulates its users on their birthdays and provides them with various bonuses. The Mostbet App is a fantastic way to access the best betting website from your mobile device. The app is free to download for both Apple and Android users and is accessible on both iOS and Android platforms. Yes, Mostbet offers live streaming of events within the app for users to enjoy mostbetz2.in.

Mostbet v5.8.4 MOD APK (Unlocked) Download

You can insure any type of wager by clicking on bet insurance. The sportsbook then calculates the cost which is included directly in your betting slip. If you win, you receive all the funds and if you lose, you will receive the insured amount to your Mostbet account.

  • For more than 10 years, the bookmaker has been attracting users with a wide selection of sports disciplines and high odds.
  • We may offer another method if your deposit problems can’t be resolved.
  • And players get a handy mobile app or website to do it anytime and anywhere.
  • The safest way to download the APK file of the Mostbet mobile app is to visit the bookmaker’s official website and find the download link in the menu.

The mostbet .com platform accepts credit and debit cards, e-wallets, bank transfers, prepaid cards, and cryptocurrency. Recently, there has been a clear trend of switching from using a computer or laptop in favor of a smartphone or any other mobile gadget. This is primarily due to the increased pace of life and people’s desire to always stay connected and “in business” regardless of ambient conditions and location. This is not time-consuming, but provides you with the best flow of work of the program.

Table games

With the app launch, the sportsbook presents an opportunity to make your sports betting and online casino games even faster and more mobile. To start the game via a mobile program, download and install it first. Mostbet is an online sports betting platform with a live-casino feature. This feature lets punters play real-time, immersive versions of their favourite casino games. With Mostbet’s live-casino app, players can access table games such as Baccarat, Roulette and Blackjack on any device.

  • The cashed out amount is calculated depending on the time you activate the cash out feature.
  • The longest way is a bank transfer, as it processes requests slowly, unlike cryptocurrencies.
  • Each user needs to have an account in order to use the application successfully.
  • The phone system may give a message about installing the software from an unknown source.

The application is available for Windows, Android, iOS, and iPhone. The absolute advantage is that you can download the application for free. It is Google’s policy not to post gambling products on the Play Market. The Android program can be downloaded from the official website of the Mostbet bookmaker.

Download Mostbet app for Android

The site is quite simple and accessible for everyone and I am sure that all players will be able to find something for themselves here. With that in mind, look out for the main Mostbet bonuses you can find. Everything so you can make the best online sports betting experience. Now many bookmakers are trying to attract as many users as possible through bonus offers.

  • Com, we also continue to improve and innovate to meet all your needs and exceed your expectations.
  • All these methods are available and reliable for use, as they are verified by the bookmaker.
  • The Mostbet minimum withdrawal can be changed so follow the news on the website.
  • Before using a bonus, it’s vital to read and comprehend the terms and conditions that apply to that specific offer.
  • Mostbet mobile is a website running in the browser on a smartphone or tablet.

It offers you a wide diversity of sports betting and casino features. Take a look at each method’s benefits and make your decision. The functionality of all versions is relevant and convenient, so you can select the version that is most convenient for you. The mobile version is suitable for those who do not want to fill up the memory of their device because applications need to be downloaded and updated. Mostbet India app is an excellent platform to start making money online while getting many positive emotions.

Account registration in Mostbet App

Every Mostbet online game is unique and optimized to both desktop and mobile versions. The Aviator Mostbet involves betting on the outcome of a virtual airplane flight. You can choose to bet on various outcomes such as the color of the plane or the distance it will travel.

  • To avoid conflict in transferring and updating data, the system will disconnect all active devices except one.
  • Now that you have an apk file on your device the only thing left is to install it.
  • However, some people will claim that the app is better due to the high speed of loading all the company’s products.
  • There is a “Popular games” category too, where you can familiarize yourself with the best picks.

On this platform, you will be able to perform almost all actions, like on a computer. For example, this will allow you to bid at any free time in any place convenient for you. Full instructions for installing the Mostbet app for players from India. Mostbet absolutely free application, you dont need to pay for the downloading and install.

Mostbet App Support

Then, permit the installation, wait for the completion, login, and the job is done. The link to download Mostbet App is presented on the page above and the official website of the betting company. You can also find the official version of the app in the App Store. A complete list of tools is presented in the program’s main menu. To play for a fee, deposit your account by any available method.

First of all, at the time, I liked the fact that the bookmaker had already been operating for more than five years. This immediately gave me some confidence, and I made an account on the website (there were no apps yet), after which I got my bonus and started betting. I always liked and enjoyed the fact that Mostbet has very good odds, and thus you can almost always earn even more. Now I’m already making a few thousand rupees a week stably without any stress. That’s why I have to give this bookmaker an excellent rating. Both in the virtual version and the live Mostbet casino, the truth is that you will be able to get the most out of this classic casino game.

How to update Mostbet app?

Mostbet constantly checks out the feedback of players, and regularly updates the app . The latest version of APK Mostbet is designed for mobile devices with Android 5.0 operating system, with 1 GB of RAM. Another great offer is the company’s loyalty program, which is based on crediting special points for depositing. We must admit that the Mostbet app download on iOS devices is faster compared to the Android ones. In particular, users can download the app directly from the App Store and don’t need to change some security settings of their iPhones or iPads. The Mostbet app download on Android is a bit harder than on iOS devices.

In addition, it’s profitable to place bets in this company since the odds here are pretty high. If you want to place bets using your Android smartphone without installing Mostbet apk file on your device, we have an alternative solution for you! The Mostbet website has a mobile version of the platform, so it will be more convenient for you to use this option for playing from a smartphone or tablet. In line with what the best online casinos in India already offer, you can bet on virtual sports and even live casino games here.

Review of the Mostbet App

That’s how you can maximize your winnings and get more value from bets. The most important principle of our work is to provide the best possible betting experience to our gamblers. Com, we also continue to improve and innovate to meet all your needs and exceed your expectations. The platform is designed to be easy to place bets and navigate. It is available in regional languages so it’s accessible even for users who aren’t fluent in English. At Mostbet India, we also have a strong reputation for fast payouts and excellent customer support.

  • It’s crucial to remember that not all payment options could be accessible in all nations and areas, and that accessibility may differ based on the jurisdiction.
  • Don’t hesitate to ask whether the Mostbet app is safe or not.
  • We provide a live section with VIP games, TV games, and various popular games like Poker and Baccarat.
  • If you download a special program to your phone, you can go to the next level of convenience in making sports bets.

The phone system may give a message about installing the software from an unknown source. To use the functionality of Mostbet, you can also download an app for Mostbet. This is a special program that requires installation on your smartphone or tablet. However, for those who have decided to download Mostbet app in advance, they will remain unnoticed. The main difference between the mobile version and the main resource is its simplified interface.

What to do if the mobile version of Mostbet does not work?

Any questions about Mostbet apk download or Mostbet apk download latest version? We offer a variety of payment methods for both withdrawal and deposit. Players can choose from popular options such as Skrill, Visa, Litecoin, and many more.

In addition, live sports betting is available to you here as a particular type of betting. There are also some schemes and features as well as diverse types of bets. To become a confident bettor, you need to understand the difference between all types of bets. By adding a deposit within the first hour of registration, you will be able to receive up to 25000₹ as a bonus. So the amount of your bonus depends only on how much you’ll be credited to your account for the first time.

Review of Application Features

To find and download the .apk file of the Mostbet application, please follow the instructions below. This is an application that gives access to betting and casino options on tablets or all types of smartphones. Don’t hesitate to ask whether the Mostbet app is safe or not.

  • For this, the international version of the bookmaker offers applications for owners of Android devices.
  • The interface of the software is designed in a gaming style with quick access to betting, both pre-match and in-play.
  • The functionality of all versions is relevant and convenient, so you can select the version that is most convenient for you.
  • A user may also receive 250 free spins instead of a deposit bonus.
  • Always gamble responsibly and enjoy the experience responsibly.

The minimum amount required to qualify for this bonus is 100 INR. If you make your initial deposit within 30 minutes of creating your new account, you will receive a 125% welcome bonus. The amount is deposited immediately when you complete your first deposit. Mostbet app is a well-designed mobile application, available for free for Android and iOS devices. The safest way to download the APK file of the Mostbet mobile app is to visit the bookmaker’s official website and find the download link in the menu.

Download Mostbet for iOS Devices

Many bettors in Pakistan bet online on sporting events at Mostbet using different gadgets. The developers have created several options for the betting company platform to satisfy all customer requests. The user can choose a convenient option – playing on the Mostbet site or using one application. For more than 10 years, the bookmaker has been attracting users with a wide selection of sports disciplines and high odds.

  • It is also completely free for any player to Mostbet download, and is easy to get on your mobile device.
  • If there are any questions about minimum withdrawal in Mostbet or other issues concerning Mostbet cash, feel free to ask our customer support.
  • For the convenience of users, the developers of the bookmaker’s office created Mostbet App for iOS.
  • There are also virtual sports betting, real-time betting and even regular lotteries that can be participated in to win big prizes.

The fastest ways are cryptocurrencies and electronic wallets. The longest way is a bank transfer, as it processes requests slowly, unlike cryptocurrencies. Now you know all the crucial facts about the Mostbet app, the installation process for Android and iOS, and betting types offered. This application will impress both newbies and professionals due to its great usability.

The Mobile Version of the Site for Pakistan

You need to open the Mostbet website and click on the Android icon. The bonus funds will be put to your account, and you use them to place bets on games or events. We offer a Mostbet exchange platform where players can place bets against each other rather than against the bookmaker.

  • Don’t forget to pay attention to the minimum and maximum amount.
  • You can get the Android Mostbet app on the official website by downloading an .apk file.
  • Users can bet on both pre-match and real-time events with odds that are constantly updated throughout the game as it progresses.
  • Download the app, it works great, and there are so many benefits from it.
  • You can also find the official version of the app in the App Store.
  • Adding a certain amount to your account balance is required to receive this bonus.

The sportsbook app provides live broadcast of selected games especially the popular ones which enables punters to bet and watch as the games happen in real time. You can view if a match is available for broadcast via the broadcast icon shown on the ongoing game. There is a dedicated in-play wagering section on the Mostbet mobile app which allows punters to place wagers on games happening in real time.

How to Update the Application When Installing via .apk

The Mostbet mobile app is an excellent option for those looking to play their favourite online casino games, such as poker. Offering the same quality gaming experience as its desktop version, the Mostbet poker app has all your favourite features on any modern device. It offers a smooth gameplay experience with fluid navigation that ensures a hassle-free experience no matter which operating system you’re playing on. Players can enjoy a wide range of online gambling options, including sports betting, casino games, and live dealer games. Our sportsbook offers a vast selection of pre-match and in-play betting markets across numerous sports.

  • The program offers you over 30 different sports disciplines to choose from, and cricket is one of them.
  • For customer convenience, each slot has the ability to switch to full screen mode.
  • You must choose the bonus you want to utilize and comply with the conditions outlined in the terms and conditions in order to collect a bonus on the Mostbet app.
  • You may report a Mostbet deposit problem by contacting the support team.

It is important to know that in this case, you can register only one game account. Consequently, if violations of the rules are revealed, severe sanctions will follow, up to the blocking of both accounts. We advise you to first open the settings of the mobile device and allow the installation of applications from unknown sources. Without this, in some cases, the installation may be blocked.

What is Mostbet?

But, we’ll discuss it later, and now, let’s delve into Mostbet Casino and different types of bets made available by Mostbet. Live bets are one of the features offered by Mostbet in Pakistan. A bettor can bet on the matches, which take place in real-time. It allows you to take advantage of in-play betting opportunities that may arise during the game, such as changing odds or changes in form.

  • However, despite all this, the app has some shortcomings, which should also be noted.
  • Once you’re in the app list, scroll until you find the Mostbet app and tap it when it appears.
  • Customer service options on the Mostbet app include live chat, email, phone assistance, and a FAQ section.
  • After registering, you can view the wide selection of bets available in the app.

Yes, some risks are involved with using this app, such as data breaches, privacy violations, and malicious software. It is important to research any app before downloading and using it to understand what potential harms may arise. Write to support-en@mostbet.com and the team will respond to email within 24 hours. The Mostbet minimum withdrawal can be different but usually the amount is ₹800.

]]>
https://affypharma.com/download-mostbet-app-play-and-win-big/feed/ 0