PHP code example of findkit / wp-findkit

1. Go to this page and download the library: Download findkit/wp-findkit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

findkit / wp-findkit example snippets


add_filter('findkit_page_meta', function ($meta, $post) {
    $meta['title'] = 'My custom title';
    return $meta;
}, 10, 2);

add_filter('findkit_allow_jwt', function ($allow) {
    return current_user_can('edit_posts');
}, 10, 1);

add_filter(
	"gettext_with_context_findkit",
	function ($translation, $text, $context) {
		if ("Findkit" === $text && "Sidebar options label" === $context) {
			return "My Product Name";
		}
		return $translation;
	},
	10,
	3
);

npm run wp-env -- run cli wp eval 'var_dump(array_keys(wp_get_abilities()));'