$string = 'Some Text .... 1. 2 .3.  Buy';
$string = preg_replace('~[^0-9]+~','',$string);
echo $string;
// 123 

For delete all version from css & js files in your Wordpress theme - I use function sdt_remove_ver_css_js with one argument. Add this code to your wp-content/themes/your-theme/function.php

// Remove WP Version From Styles
add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 );
// Remove WP Version From Scripts
add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 );

// Function to remove version numbers
function sdt_remove_ver_css_js( $src ) {
	if ( strpos( $src, 'ver=' ) )
		$src = remove_query_arg( 'ver', $src );
	return $src;
}

Awesome!

If you update your hosting to v7.1 & more - you can look same notification 'Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJw_sigpro has a deprecated constructor in .../www/plugins/content/jw_sigpro/jw_sigpro.php on line 19'

This code fix this problem you need Open plugins/content/jw_sigpro/jw_sigpro.php find this code in line 28:

function plgContentJw_sigpro(&$subject, $params)
	{
		parent::__construct($subject, $params);

		// Define the DS constant under Joomla! 3.0
		if (!defined('DS'))
		{
			define('DS', DIRECTORY_SEPARATOR);
		}
	}

 And replase it to this code:

public function __construct(&$subject, $params) {
	parent::__construct($subject, $params);

	// Define the DS constant under Joomla! 3.8.2+
	if (!defined('DS')){
		define('DS', DIRECTORY_SEPARATOR);
	}
}

Awesome - it work done! :-)

If you see same problem with jw_sig.php  - just download free new plugin from GitHub and install it: https://github.com/joomlaworks/simple-image-gallery

Sunday, 29 October 2017 17:32

[Schema.org] Micro-markup menu items

Many of us are very familiar with micro-markup and know firsthand what schema.org is. But I would like to note that not many people use this format to mark the navigation menu of the site. Here is an example of marking menu items in the schema.org format:

<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
	<li itemprop="name">
		<a itemprop="url" href="#">Link</a>
	</li>
	<li itemprop="name">
		<a itemprop="url" href="#">Link</a>
	</li>
	<li itemprop="name">
		<a itemprop="url" href="#">Link</a>
	</li>
</ul> 

 

Page 1 of 13