Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
PUM_Extension_Activator::__construct( $class_name )
Setup the activator class
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Parameters Parameters
- $class_name
-
(Required)
Source Source
File: classes/Extension/Activator.php
public function __construct( $class_name ) { // We need plugin.php! require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Validate extension class is valid. if ( in_array( false, array( class_exists( $class_name ), property_exists( $class_name, 'NAME' ), property_exists( $class_name, 'REQUIRED_CORE_VER' ), method_exists( $class_name, 'instance' ), ) ) ) { return; } $this->extension_class_name = $class_name; $this->extension_id = $this->get_static_prop( $class_name, 'ID' ); $this->extension_wp_repo = $this->get_static_prop( $class_name, 'WP_REPO' ); $this->extension_name = $this->get_static_prop( $class_name, 'NAME' ); $this->extension_version = $this->get_static_prop( $class_name, 'VER' ); $this->required_core_version = $this->get_static_prop( $class_name, 'REQUIRED_CORE_VER' ); $popup_maker_data = get_plugin_data( WP_PLUGIN_DIR . '/popup-maker/popup-maker.php', false, false ); if ( $popup_maker_data['Name'] == 'Popup Maker' ) { $this->core_installed = true; $this->core_path = 'popup-maker/popup-maker.php'; } }
Expand full source code Collapse full source code View on Trac