mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Remove deprecated App::registerStylesheet()/FooterScript() - replace with DI::page()->registerStylesheet()/FooterScript()
This commit is contained in:
parent
335fcf670f
commit
4b6527e273
5 changed files with 15 additions and 10 deletions
|
@ -13,6 +13,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
|
||||
function pageheader_install() {
|
||||
Hook::register('page_content_top', __FILE__, 'pageheader_fetch');
|
||||
|
@ -26,7 +27,7 @@ function pageheader_addon_admin(App &$a, &$s)
|
|||
|
||||
/* Add our stylesheet to the page so we can make our settings look nice */
|
||||
$stylesheetPath = __DIR__ . '/pageheader.css';
|
||||
$a->registerStylesheet($stylesheetPath);
|
||||
DI::page()->registerStylesheet($stylesheetPath);
|
||||
|
||||
$words = Config::get('pageheader','text');
|
||||
if(! $words)
|
||||
|
@ -65,7 +66,7 @@ function pageheader_fetch(App $a, &$b)
|
|||
}
|
||||
|
||||
$stylesheetPath = __DIR__ .'/pageheader.css';
|
||||
$a->registerStylesheet($stylesheetPath);
|
||||
DI::page()->registerStylesheet($stylesheetPath);
|
||||
|
||||
if ($s) {
|
||||
$b .= '<div class="pageheader">' . $s . '</div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue