Skip to content

Commit

Permalink
file name changes and minor code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
infinitnet committed Oct 21, 2023
1 parent 1ccffcd commit 3a257d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
24 changes: 16 additions & 8 deletions relevant-density-optimizer.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
<?php
/**
* Plugin Name: Relevant Density Optimizer
* Description: Highlight relevant terms in Gutenberg editor and optimize density.
* Description: Highlight relevant terms in Gutenberg editor and optimize density for SEO.
* Author: Infinitnet
* Version: 1.6
* Author URI: https://infinitnet.io/
* Plugin URI: https://infinitnet.io/relevant-density-optimizer/
* Update URI: https://github.com/infinitnet/relevant-density-optimizer
* Version: 1.6.1
* License: GPLv3
* Text Domain: relevant-density-optimizer
*/

namespace Infinitnet\RDO;

define('RDO_VERSION', '1.6.1');

function rdo_enqueue_block_editor_assets() {
if (!wp_script_is('rdo-editor-js', 'enqueued')) {
wp_enqueue_script('rdo-editor-js', plugin_dir_url(__FILE__) . 'editor.js', array('wp-plugins', 'wp-edit-post', 'wp-element', 'wp-data', 'wp-compose', 'wp-components'), '1.1', true);
if (!wp_script_is('rdo-plugin-js', 'enqueued')) {
wp_enqueue_script('rdo-plugin-js', plugin_dir_url(__FILE__) . 'rdo.js', array('wp-plugins', 'wp-edit-post', 'wp-element', 'wp-data', 'wp-compose', 'wp-components'), RDO_VERSION, true);
}

wp_enqueue_style('rdo-editor-css', plugin_dir_url(__FILE__) . 'editor.css', array(), '1.1');
wp_enqueue_style('rdo-plugin-css', plugin_dir_url(__FILE__) . 'rdo.css', array(), RDO_VERSION);
}

add_action('enqueue_block_editor_assets', 'rdo_enqueue_block_editor_assets');

function rdo_register_meta() {
register_meta('post', '_important_terms', array(
'show_in_rest' => true,
Expand All @@ -27,4 +34,5 @@ function rdo_register_meta() {
));
}

add_action('init', 'rdo_register_meta');
add_action('enqueue_block_editor_assets', __NAMESPACE__ . '\rdo_enqueue_block_editor_assets');
add_action('init', __NAMESPACE__ . '\rdo_register_meta');

0 comments on commit 3a257d2

Please sign in to comment.