WordPress.org

Forums

WP SVG Icons
[resolved] cannot activate...displays the following error (11 posts)

  1. Todo Pertin
    Member
    Posted 1 year ago #

    "Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /home/u895883364/public_html/wordpress/wp-content/plugins/svg-vector-icon-plugin/includes/scripts.php on line 1"

    help.

    https://wordpress.org/plugins/svg-vector-icon-plugin/

  2. Evan Herman
    Member
    Plugin Author

    Posted 1 year ago #

    What does that file, scripts.php look like for you? There should be no errors, especially upon activavtion

  3. Todo Pertin
    Member
    Posted 1 year ago #

    the first few lines in script.php are as:

    <?php
    
    /***********************************
    
    *	SCRIPT CONTROLS
    
    ***********************************/
    
    function wordpress_svg_icon_plugin_load_style() {
    
    	wp_register_style( 'svg-icon-set1-style',  plugin_dir_url(__FILE__).'css/wordpress-svg-icon-plugin-style.css');	
    
    	wp_enqueue_style( 'svg-icon-set1-style' );
    
    	wp_register_style( 'svg-icon-set1-expansion-style',  plugin_dir_url(__FILE__).'css/wordpress-svg-icon-plugin-expansion-style.css');	
    
    	wp_enqueue_style( 'svg-icon-set1-expansion-style' );
    
    		$dest = wp_upload_dir();
    		$dest_path = $dest['path'];
    
    		$customFontPackPath = $dest_path.'/wp-svg-icons/custom-pack/';
    		$current_year = date('Y');
    		$current_month = date('m');
    		$date_concatenation = $current_year.'/'.$current_month.'/';
    		$customFontPackPath = str_replace($date_concatenation,'',$customFontPackPath);
    		$customPackStyles = '/style.css';
    
    			// Check if there is a custom pack style file
    			// if there is enqueue it
    			if ( file_exists($customFontPackPath.$customPackStyles)) {

    WHAT COULD BE WRONG...

  4. Evan Herman
    Member
    Plugin Author

    Posted 1 year ago #

    Please don't yell. That won't accomplish anything any faster.

    If you want to grant me access to FTP, I can take a look. Other than that everything looks fine in that file.

    If you'd like me to take a look you can email me at Evan.m.herman@gmail.com

  5. Evan Herman
    Member
    Plugin Author

    Posted 1 year ago #

    I would also double check there are no leading empty spaces at the top of the document, in any of the files. I'm not sure why your seeing that error.

    Try removing the comment,

    /***********************************
    
    *	SCRIPT CONTROLS
    
    ***********************************/

    but again that shouldn't be causing any issues.

  6. Todo Pertin
    Member
    Posted 1 year ago #

    I'm not yelling...in fact I'm impressed and grateful for your replies....how do I grant access to ftp? should I send you my password???

  7. Todo Pertin
    Member
    Posted 1 year ago #

    I removed the code you mentioned. It doesnt help.

  8. Evan Herman
    Member
    Plugin Author

    Posted 1 year ago #

    You'll need to get in contact with your host provider to get the FTP details. It doesn't seem to make sense that your receiving an error on activation. Maybe it's conflicting with another plugin you have installed?

  9. Todo Pertin
    Member
    Posted 1 year ago #

    ok it's working now. had to delete all the other plugins first though...perhaps it was conflicting with some plugin I had previously installed...thank you so much for your response.

  10. Todo Pertin
    Member
    Posted 1 year ago #

    but how do I add put these icons slongside the menu links as in makeuseof.com ? and how do I get a sticky header like that of makeuseof.com's? sorry for asking it here but I have never gotten any help/reply from the wordpress suppost forum...It's disappointed me so much so that I have started learning css and php by myself...never thought would need to learn them. I just know some html. suggest me a theme that is easy to customize and looks like makeuseof.com (especially the sticky header) and is free. I'd have loved to pay for a premium theme but I dont have a credit card and they dont take cash.

  11. Evan Herman
    Member
    Plugin Author

    Posted 1 year ago #

    If you want to add the icons to the menu, you'll need to look through the CSS file included with the plugin, and then add some more CSS styles to the navigational items.

    I have set up a demonstration of doing so on my site here. Scroll down to adding icons to the navigation.

    That should point you in the right direction.

    Evan

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP SVG Icons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic