What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-25 01:44:14
estimated reading time php
* Calculate the estimated reading time for a given piece of $content depending on words count. * * @param string $content Content to calculate read time for. * @param int $wpm Estimated words per minute of reader. * * @returns int $time Estimated reading ... Add solution -
PHP 2021-10-20 08:39:21
wordpress add widget developer
<?php class My_Widget extends WP_Widget { function __construct() { parent::__construct(  ... Add solution -
PHP 2021-10-14 02:52:03
php strip tags
<?php $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>'; echo strip_tags($text); //Test paragraph. Other text // Allow <p> and <a> echo strip_tags($text, '<p>&... Add solution -
Other 2021-10-08 20:39:09
Strip off tags in text
<?php $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>'; echo strip_tags($text); echo "\n"; // Allow <p... Add solution -
Other 2021-10-05 08:48:03
wordpress create theme options page
<?php /** * Create A Simple Theme Options Panel * */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } // Start Class if ( ! class_exists( 'WPEX_Theme_Options' ) ) { class WPEX_Theme_Options { /** * Start things up *... Add solution