A dead simple library to inject module suggestions into WordPress plugin search results.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Arūnas Liuiza 9202b822d3
Create LICENSE
5 years ago
LICENSE Create LICENSE 5 years ago
README.md add link to my site, add notice at the end of readme 5 years ago
class-tinyhelp.php fix mistype 5 years ago
composer.json add composer.json 5 years ago
tinyhelp.css intial version 5 years ago
tinyhelp.js fix replaceOnNewResults to support more than one result 5 years ago

README.md

TinyHelp

A dead simple library to inject module suggestions into WordPress plugin search results.

License

Since apparently it is now okay to inject suggestions into WordPress plugin search results on wp-admin, this little library will help you to do just that. All you have to do is to include it in your project, define some suggestions in an array and pass it to TinyHelp class. Here is how it looks:

Imgur

Usage

Here is some sample code:

$args = array(
	'slug'        => 'tinycoffee2',
	'name'        => __( 'tinyCoffee', 'tinyhelp-sample' ),
	'bottom_text' => __( 'This is a feature suggestion created by tinyHelp library', 'tinyhelp-sample' ),
	'modules'     => array(
		'test'  => array(
			'name'              => __( 'Test Module', 'tinyhelp-sample' ),
			'short_description' => __( 'Short description for this injected module goes here', 'tinyhelp-sample' ),
			'version'           => '0.1.0',
			'author_name'       => __( 'Arūnas', 'tinyhelp-sample' ),
			'author_uri'        => 'https://arunas.co',
			'search_terms'      => array( 'test.*', 'backup', 'coffee' ),
			'icons'             => array(
				'1x'  => 'https://placeholder.pics/png/128',
				'2z'  => 'https://placeholder.pics/png/256',
				'svg' => 'https://placeholder.pics/svg/300',
			),
			'links'             => array(
				array(
					'type'       => 'button',
					'title'      => __( 'Get started', 'tinyhelp-sample' ),
					'link'       => 'https://wp.org/plugins/tinycoffee',
					'attributes' => array(
						'target' => '_blank',
					),
				),
				array(
					'type'       => 'link',
					'title'      => __( 'Learn More', 'tinyhelp-sample' ),
					'link'       => 'https://arunas.co',
					'attributes' => array(
						'target' => '_blank',
					),
				),
			),
		),
		'test2' => array(
			'name'              => __( 'Test Module 2', 'tinyhelp-sample' ),
			'short_description' => __( 'Short description for this injected module goes here', 'tinyhelp-sample' ),
			'version'           => '0.1.0',
			'author_name'       => __( 'Arūnas', 'tinyhelp-sample' ),
			'author_uri'        => 'https://arunas.co',
			'search_terms'      => array( 'testing', 'beta', 'backup' ),
			'icons'             => array(
				'1x'  => 'https://placeholder.pics/png/128',
				'2z'  => 'https://placeholder.pics/png/256',
				'svg' => 'https://placeholder.pics/svg/300',
			),
			'links'             => array(
				array(
					'type'       => 'button',
					'title'      => __( 'Get started', 'tinyhelp-sample' ),
					'link'       => 'https://arunas.blog',
					'attributes' => array(
						'target' => '_blank',
					),
				),
			),
		),
	),
);
$th = new TinyHelp( $args );

You can also check it out as a sample plugin here (you'll need to run composer install after you checkout the repo).

License

This library is open source and free for everyone to use. It is licensed under MIT license.

Author

This library was built by Arūnas Liuiza, based on concept, first introduced by Jetpack. Any contributions are welcome.

Notice

This is still a very fresh project. If you note any bugs, please report them and I'll try to fix them ASAP. I feel that the code is quite self explanatory, but I'll add more comments and documentation in the future, as well.