Sharepoint - Hide options from ECB Menu in SharePoint 2013 Library

I hope it's not too late. I'll post anyway. It might be useful to others.

If your options' visibility is dependant on value of some column in respective item, I'd suggest you use JSOM with some tricks. I had used the same for one of my projects.

Firstly, assuming that you are deploying custom ECB menus via a module. If not, please do so. And associate these ECB options to a content type using RegistrationType as shown below, otherwise those options will keep showing everywhere.

<CustomAction Id="CustomActionID" RegistrationType="ContentType" RegistrationId="YOUR-CONTENTTYPE-ID"
                ImageUrl="/_layouts/1033/Images/RTEDCELL.GIF"
    Location="EditControlBlock"
    Sequence="300"
    Title="Custom ECB Menu" >

    <UrlAction Url="YOUR URL"/>

  </CustomAction>

After that in the same module add the jQuery and your own custom javascript/jQuery functions. Here's one problem in this - I had to add these in a layouts mapped folder because it didn't work for me when I added them in Style library and Site Assets. Then I tried with layouts and it worked so I didn't investigate much into that.

Here's how you would add the scriptlinks in the same module.

<CustomAction Location="ScriptLink" ScriptSrc="YOUR_LAYOUTS_MAPPED_FOLDER_NAME/jquery.min.js" Sequence="301"></CustomAction>
  <CustomAction Location="ScriptLink" ScriptSrc="YOUR_LAYOUTS_MAPPED_FOLDER_NAME/YOUR_JS_CODE_FILE.js" Sequence="302"></CustomAction>

Now, in YOUR_JS_CODE_FILE.js, you can add the code to get the list items and can check the desired column's value to decide whether to show or hide that option. It's no big task to get the items' column's value but you'll have to jump through hoops to hide/show the ECB options.