pmahan
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Template for Custom Post Types] Stop data snoopingif you like the functionality of the plugin but do not want to send out your site and admin email every time it is activated — quote out or remove these lines before activating
$message = 'Hi Rahul, Template for custom posttype Plugin(1.0.1) is installed on '.get_option("siteurl").'site with email'.get_option("admin_email"); wp_mail( '[email protected]', 'Template For Customposttype plugin downloaded', $message );but I agree this code should be removed for the plugin to remain in the repository
if you still need the custom css to work – change at line 101 in login-with-ajax.php
//Enqueue scripts - Only one script enqueued here.... theme JS takes priority, then default JS if( !is_admin() ) { $js_url = defined('WP_DEBUG') && WP_DEBUG ? 'login-with-ajax.source.js':'login-with-ajax.js'; wp_enqueue_script( "login-with-ajax", self::locate_template_url($js_url), array( 'jquery' ) ); wp_enqueue_style( "login-with-ajax", self::locate_template_url('widget.css') ); }to
//Enqueue scripts - Only one script enqueued here.... theme JS takes priority, then default JS if( !is_admin() ) { $js_url = defined('WP_DEBUG') && WP_DEBUG ? 'login-with-ajax.source.js':'login-with-ajax.js'; wp_enqueue_script( "login-with-ajax", self::locate_template_url($js_url), array( 'jquery' ) ); //Enqueue stylesheets - Only one style enqueued here.... theme CSS takes priority, then default CSS //The concept here is one stylesheet is loaded which will work for multiple templates. if( file_exists(get_stylesheet_directory().'/plugins/login-with-ajax/widget.css') ){ //Child Theme (or just theme) wp_enqueue_style( "login-with-ajax", get_stylesheet_directory_uri().'/plugins/login-with-ajax/widget.css' ); }else if( file_exists(get_template_directory().'/plugins/login-with-ajax/widget.css') ){ //Parent Theme (if parent exists) wp_enqueue_style( "login-with-ajax", get_template_directory_uri().'/plugins/login-with-ajax/widget.css' ); }else{ //Default file in plugin folder wp_enqueue_style( "login-with-ajax", $plugin_url."/widget/widget.css" ); } }I just borrowed it from a previous version – you could do the same thing with the JS but I didn’t need the JS
Viewing 2 replies - 1 through 2 (of 2 total)