0

I'm having little trouble with easeInOutCubic.

I want to use jquery switchButton plugin: http://olance.github.io/jQuery-switchButton/ inside wordpress admin panel.

I've included code correctly, and I'm also positive I've jquery-ui core.

<script type='text/javascript' src='http://localhost/test/wp-admin/load-scripts.php?c=1&amp;load%5B%5D=admin-bar,hoverIntent,common,jquery-ui-core,jquery-ui-widget,jquery-ui-tabs,jquery-ui-mouse,jquery-ui-slider,jquery-ui-button&amp;ver=3.5.2'></script>

I thought easeInOutCubic was part of jquery-ui core. Or not? Does wordpress have it included or do I've to include it manually? Any ideas?

S.


Linux curl request to login into my local wordpress

I never dealed with requests before, but I really want to get into it.

I have my own local wordpress installed, where I have this request with this info from LiveHttpHeaders (firefox):

PS: I've excluded the data from post content, that was not really needed. Also tried with all the params, still not working.

POST

url: http://localhost/wordpress/wp-login.php

HTTP Headers:

Host: localhost
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/index.htm
Cookie: wp-settings-time-1=1379163132; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_bbfa5b726c6b7a9cf3cda9370be3ee91=admin%7C1379335932%7Ca34b99198037170f7e76dffd1c6bc1cb; wassup_screen_res=1366%20x%20768; wassup=NjE1ZWM0Yzk4MzczOWYxZTEwZmU4YWY5Y2NlOTkxNzU6OjEzNzkxNjUwNzU6OjEzNjYgeCA3Njg6OjEyNy4wLjAuMTo6dW5rbm93bjo6
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 113

Post Content: log=admin&pwd=parola19&wp-submit=Log+In

I've made this curl in terminal to login:

sudo curl -x POST -d log="admin" -d pwd="parola19" -d wp-submit="Log+In" http://localhost/wordpress/wp-login.php > /var/www/index.html

I get this error from curl: curl: (5) Couldn't resolve proxy 'POST'

For this command:

sudo curl -d log="admin" -d pwd="parola19" -d wp-submit="Log+In" http://localhost/wordpress/wp-login.php > /var/www/index.html

I save it to a file, and I get this message on the page from wordpress: ERROR: Invalid username. Lost your password?

Do you guys have any suggestions ?

Also this is source of the wordpress login form:

<form name="loginform" id="loginform" action="http://localhost/wordpress/wp-login.php" method="post">
    <p>
        <label for="user_login">Username<br />
        <input type="text" name="log" id="user_login" class="input" value="" size="20" /></label>
    </p>
    <p>
        <label for="user_pass">Password<br />
        <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
    </p>
    <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever"  /> Remember Me</label></p>
    <p class="submit">
        <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="Log In" />
        <input type="hidden" name="redirect_to" value="http://localhost/wordpress/wp-admin/" />
        <input type="hidden" name="testcookie" value="1" />
    </p>
</form>
4

1 に答える 1

2

そのため、イージングは​​ jquery-ui-core には含まれていません。個別に有効にする必要があります。

wp_enqueue_script("jquery-effects-core");

上記のコードでうまくいきました。

于 2013-09-14T13:16:04.167 に答える