free_addons = apply_filters( 'modula_free_extensions', array( 'modula-foo-migrator' => array( 'slug' => 'modula-foo-migrator', 'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ), 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png', 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery') ), 'modula-nextgen-migrator' => array( 'slug' => 'modula-nextgen-migrator', 'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ), 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png', 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery') ), 'modula-envira-migrator' => array( 'slug' => 'modula-envira-migrator', 'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ), 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png', 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery') ), 'modula-photoblocks-gallery-migrator' => array( 'slug' => 'modula-photoblocks-gallery-migrator', 'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ), 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png', 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery') ), 'modula-final-tiles-migrator' => array( 'slug' => 'modula-final-tiles-migrator', 'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ), 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png', 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery') ) ) ); } private function check_for_addons() { $data = get_transient( 'modula_all_extensions' ); if ( false !== $data ) { return $data; } $addons = array(); $url = MODULA_PRO_STORE_URL . '/wp-json/mt/v1/get-all-extensions'; // Get data from the remote URL. $response = wp_remote_get( $url ); if ( ! is_wp_error( $response ) ) { // Decode the data that we got. $data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! empty( $data ) && is_array( $data ) ) { $addons = $data; // Store the data for a week. set_transient( 'modula_all_extensions', $data, 30 * DAY_IN_SECONDS ); } } return apply_filters( 'modula_addons', $addons ); } public function render_addons() { $this->addons = $this->check_for_addons(); $addons_images = array( 'modula-whitelabel', 'modula-roles', 'modula-defaults', 'modula-zoom', 'modula-download', 'modula-exif', 'modula-albums', 'modula-slider', 'modula-password-protect', 'modula-watermark', 'modula-deeplink', 'modula-speedup', 'modula-video','modula-advanced-shortcodes','modula-slideshow','modula-protection', 'modula-fullscreen' ); $addons = apply_filters( 'modula_package_sortage', $this->addons ); if ( ! empty( $addons ) ) { foreach ( $addons as $addon ) { $this->render_addon_top( $addon, $addons_images ); echo '