• I would like to add a full edit button to the front-edit editor plugin, like:

    It’s currently like this:

    [EDIT] Text text text

    I would like to make it like:

    [EDIT] Text text text (enables front-end editor)
    [FULL EDIT] Text Text Text (goes to the back-end editor)

    I think this is the current code for the [EDIT] button:

    wp-content/plugins/front-end-editor/build/edito.min.js

    base.prototype.pre_edit_button = function() {
          var _this = this;
          return jQuery('<button>', {
            'class': 'fee-hover-edit',
            'html': FrontEndEditor.data.edit_text,
            'click': function(ev) {
              _this.last_mouse_pos = ev.pageY;
              return _this.start_editing();
            }
          });

    http://wordpress.org/extend/plugins/front-end-editor/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Lucas

    (@criatweb)

    Thread Starter Lucas

    (@criatweb)

    Here’s my lame try :s

    }, base.prototype.edit_button = function () {
                var _this = this;
                return jQuery("<?php edit_post_link( __( 'Full Edit',) ?> ", {
                })
    Plugin Author scribu

    (@scribu)

    You’re trying to embed PHP directly into a JavaScript file. It won’t work, because the JavaScript file doesn’t have accees to any PHP functions defined in WordPress, such as edit_post_link().

    You can either:

    a) generate the full edit button in your theme (hidden) and then re-position it via JS.

    b) send an AJAX request with the post ID, get back the edit link and insert it into the DOM via JS.

    Thread Starter Lucas

    (@criatweb)

    scribu… As you can see I have very limited programming knowledge… I don’t know if it’s too hard to do this, but I would be simply amazed if you could help make it come true… It isn’t about not willing to do, it’s just that I have absolutelly no idea how even to start =/

    Thread Starter Lucas

    (@criatweb)

    Maybe it’s easier to create a button to redirect to the “Page Edit” in back-end? With no specific page id, just like:

    wp-admin/edit.php?post_type=page

    Plugin Author scribu

    (@scribu)

    I would be simply amazed if you could help make it come true…

    Learn JavaScript; it’s not that hard, especially now with so many free online courses.

    Thread Starter Lucas

    (@criatweb)

    Yeah me and my partner really intend to learn javascript and php. We are working on this project to see if things get better for us =p we are working for 12 hours (or more) straight for the last 7 days (and incountable hours for the last 6 months) to see this come true… We want to release it fast because we can’t handle it anymore… You have no idea how frustrating it can be… But we are almost over, finally… We just need to finish this, start selling, pay our debts and do some courses, preferably with private teacher for us both, that’s what we intend to do – In the meantime we have no time to stop everythign to learn, you know? things are really fucked up. We are brazilians, we intend to expand this project to outer borders and stuff, this is big for us….

    Plugin Author scribu

    (@scribu)

    Yeah, I’ve heard that one before: “We’ll really sit down and learn WordPress, just after we finish this client project. Can you help? (It will be the last time; we promise.)”

    Good luck.

    Thread Starter Lucas

    (@criatweb)

    This isn’t a client’s project… no one is paying us to do this, it’s our private project… Long story, I don’t like to give details…. You might have heard that before, but this one is true. I don’t blame you for not believing me though… You would be surprised…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to add a full edit link?’ is closed to new replies.