I created a plugin and submit codecanyon. Now it rejected and need some improvement.
-
- Make sure that the code doesn’t raise any PHP errors, notices or warnings. Enable WP_DEBUG.
-
- Include CSS/JS file the right way using wp_enqueue
-
- Please do not deregister or ignore the default version of jQuery being used by the theme and load a custom version.
-
- Run the code through the plugincheck WP plugin.
-
- Make sure no deprecated methods are being used by the plugin. The above plugin will catch most of them so just do a quick check.
I have not found any errors when enable WP_DEBUG. o.O
And looks on code. I think I include CSS/JS file wp_enqueue. No?
add_shortcode( 'pull-quote', 'pull_quote_shortcode' );
function vtour_360_shortcode( $atts) {
$output = '';
$pull_quote_atts = shortcode_atts( array(
'width' => '100%',
'height' => '300px',
'img' => ' ',
'audio' => 'false',
'audio_src' => ' ',
'autoscrol' => 'true',
'control' => 'true'
), $atts );
wp_enqueue_script( 'jquery-min', plugins_url( '/js/jquery-1.12.2.min.js', __FILE__ ) );
wp_enqueue_script( 'three-min', plugins_url( '/js/three.min.js', __FILE__ ) );
wp_enqueue_script( 'jquery-fullscreen', plugins_url( '/js/jquery.fullscreen.js', __FILE__ ) );
wp_enqueue_script( 'mousetrap-min', plugins_url( '/js/mousetrap.min.js', __FILE__ ) );
wp_enqueue_script( 'virtual-tour-js', plugins_url( '/js/360.virtual.tour.js', __FILE__ ) );
/* CSS */
wp_enqueue_style( 'custom-style', plugins_url( '/css/style.css', __FILE__ ) );
wp_enqueue_style( 'font-awesome', plugins_url( '/css/font-awesome.min.css', __FILE__ ) );
?>
<!-- HTML goes there -->
<? } ?>
<?
return $output;
}
function vtour_360_register_shortcode() {
add_shortcode( 'vtour_360', 'vtour_360_shortcode' );
}
add_action( 'init', 'vtour_360_register_shortcode' );
add_action( 'admin_menu', 'vtour_360_custom_admin_menu' );
function vtour_360_custom_admin_menu() {
add_options_page(
'360 Virtual Tour WP',
'360 Virtual Tour WP',
'manage_options',
'vtour_360',
'vtour_360_options_page'
);
}
function vtour_360_options_page() {
?>
<!-- HTML goes there -->
<?php
}
Please help to improve code!. Thank you.