X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fphp%2Fsrc%2FPlugin%2FFilter%2FPhp.php;fp=web%2Fmodules%2Fcontrib%2Fphp%2Fsrc%2FPlugin%2FFilter%2FPhp.php;h=496bce83582acbdc83b942c838cc48f44af0082e;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/php/src/Plugin/Filter/Php.php b/web/modules/contrib/php/src/Plugin/Filter/Php.php new file mode 100644 index 000000000..496bce835 --- /dev/null +++ b/web/modules/contrib/php/src/Plugin/Filter/Php.php @@ -0,0 +1,74 @@ +' . t('Using custom PHP code') . ''; + $output .= '

' . t('Custom PHP code may be embedded in some types of site content, including posts and blocks. While embedding PHP code inside a post or block is a powerful and flexible feature when used by a trusted user with PHP experience, it is a significant and dangerous security risk when used improperly. Even a small mistake when posting PHP code may accidentally compromise your site.') . '

'; + $output .= '

' . t('If you are unfamiliar with PHP, SQL, or Drupal, avoid using custom PHP code within posts. Experimenting with PHP may corrupt your database, render your site inoperable, or significantly compromise security.') . '

'; + $output .= '

' . t('Notes:') . '

'; + $output .= ''; + $output .= '

' . t('A basic example: Creating a "Welcome" block that greets visitors with a simple message.') . '

'; + $output .= ''; + $output .= '

' . t('Drupal.org offers some example PHP snippets, or you can create your own with some PHP experience and knowledge of the Drupal system.', [':drupal' => 'http://drupal.org', ':php-snippets' => 'http://drupal.org/documentation/customization/php-snippets']) . '

'; + return $output; + } + else { + return t('You may post PHP code. You should include <?php ?> tags.'); + } + } + +}