Skip to content

Commit

Permalink
Updatd PHP Simple HTML DOM Parser to latest v1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bhashkar007 committed Jun 5, 2022
1 parent b825c4d commit 0565013
Show file tree
Hide file tree
Showing 6 changed files with 2,364 additions and 1,742 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## 1.0.0 - 2018-04-24
### Added
- Initial release

## 1.1.0 - 2022-06-02
- Updatd PHP Simple HTML DOM Parser to latest v1.9.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ or

This will output the source of the first image found, which then can be used in `<img>` tag.

Brought to you by [Bhashkar Yadav](http://sidd3.com)
Brought to you by [Bhashkar Yadav](https://360adaptive.com)
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "by/first-image",
"description": "A plugin to get first image from Redactor Field.",
"description": "A plugin to get first image from Redactor Field.",
"type": "craft-plugin",
"version": "1.0.0",
"version": "1.1.0",
"keywords": [
"craft",
"cms",
Expand All @@ -18,7 +18,7 @@
"authors": [
{
"name": "Bhashkar Yadav",
"homepage": "http://sidd3.com"
"homepage": "https://360adaptive.com"
}
],
"require": {
Expand Down
9 changes: 4 additions & 5 deletions src/libs/HtmlDomParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@

namespace by\firstimage\libs;

require 'simplehtmldom_1_5'.DIRECTORY_SEPARATOR.'simple_html_dom.php';
require 'simplehtmldom_1_9_1' . DIRECTORY_SEPARATOR . 'simple_html_dom.php';

class HtmlDomParser {

/**
* @return \simplehtmldom_1_5\simple_html_dom
* get html dom from string
*/
static public function file_get_html() {
return call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , func_get_args() );
return call_user_func_array ( 'file_get_html' , func_get_args() );
}

/**
* get html dom from string
* @return \simplehtmldom_1_5\simple_html_dom
*/
static public function str_get_html() {
return call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , func_get_args() );
return call_user_func_array ( 'str_get_html' , func_get_args() );
}
}
Loading

0 comments on commit 0565013

Please sign in to comment.