wp_enqueue_scripts not working inside shortcode

$shortcode = new Shortcode_Class(); class Shortcode_Class { /** * If you should add the script or not * * @var bool */ private $addScript = false; public function __construct() { add_shortcode(‘test_shortcode’, array($this, ‘shortcode_content’)); // wp_enqueue_scripts // If you use the below the CSS and JS file will be added on everypage // add_action( ‘wp_enqueue_scripts’, array($this, … Read more

Using Checkboxes on Plugin Options Page for Custom Plugin

This should do it: // Going to add a conditional statement here to run this vc_remove_element function if the checkbox for Row is selected vc_remove_element( “vc_row” ); // Row add_action(‘admin_menu’, ‘plugin_admin_settings_tab’); function plugin_admin_settings_tab() { add_options_page(‘Remove Visual Composer Elements’, ‘Remove Visual Composer Elements’, ‘manage_options’, ‘remove_visual_composer_elements’, ‘plugin_rvce_options_page’); add_action(‘admin_init’, ‘plugin_rvce_admin_init’); } ?> <?php function plugin_rvce_options_page() { ?> <div> … Read more