Avainsanana WordPress

Preventing ownership changes is a UNIX feature designed to prevent bad things from happening

2. heinäkuuta 2015 klo 17.32
Sijainti: Muut: Super User
Avainsanat: turvallisuus, UNIX, WordPress

Preventing ownership changes is not a filesystem/Access Control Lists feature, it’s a UNIX feature designed to prevent bad things from happening.

I suppose you could give the wordpress user the permission to chown via sudoers if you really wanted to, but I would question the reasons for trying to do this in the first place.

Vastaa viestiin sen kontekstissa (Super User)

Trying to get property of non-object in … inc/template-tags.php on line 61

26. kesäkuuta 2015 klo 18.57
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: WordPress

Hi,

I’m getting this entry in my server log when I open the latest post in single-post view:

Trying to get property of non-object in [...]/wp-content/themes/cover/inc/template-tags.php on line 61

It looks like the reference to $next->ID on said line is causing this; there’s no next post from the newest, obviously. There is a test for ! $next && ! $previous on line 51, but I’m guessing the block generating$next_img_array for next_post_link should also be wrapped with a separate test for the existence of$next, to suppress the error.

Vastaa viestiin sen kontekstissa (Github)

I would highly recommend Daniel’s much simpler solution

4. maaliskuuta 2015 klo 17.38
Sijainti: Muut: Stack Exchange
Avainsanat: WordPress

I would highly recommend Daniel’s much simpler solution over the one currently selected as correct:

$user = get_userdata( $user_id );
if ( $user == false ) {
    //user id does not exist
} else {
    //user id exists
}

Vastaa viestiin sen kontekstissa (Stack Exchange)

WordPress antaa säätää kommentoitavuuden postauskohtaisesti

3. elokuuta 2012 klo 19.42
Sijainti: Blogit: Silmänkääntövankila
Avainsanat: saavutettavuus, WordPress

WordPress antaa säätää kommentoitavuuden postauskohtaisesti, eli jos julkaisit tuon ennen kuin olit ruksannut mainitsemasi valikkokohdan, siinä julkaistussa on vielä vanhan asetuksen myötä kommentointi suljettu (tuon yleisasetuksen muuttaminen ei vaikuta vanhojen postausten kommentoitavuuteen). Postausten muokkausnäkymässä, ylälaidassa on (suomenkielisessä wp.comissa) ”Näyttöasetukset”-namiska, jolla saa muokkauskilkkeitä piiloon ja näkyviin. Yksi niistä on ”Keskustelu”, jolla sen postauskohtaisen kommentoitavuusasetuksen (”Salli kommentointi”) saa näkyviin, jollei se jo ole.

Vastaa viestiin sen kontekstissa (Silmänkääntövankila)

Patch: fix array key, has_cap warnings

1. elokuuta 2012 klo 21.15
Sijainti: Keskustelupalstat: WordPress Support Forums
Avainsanat: WordPress

— wp-status-net.php 2012-07-16 20:51:15.604960940 +0300

+++ wp-status-net.php.new	2012-08-01 21:04:36.392944461 +0300
@@ -700,7 +700,7 @@
 function wpstatusnet_options()
 {

-      	if ( 'save' == $_REQUEST['action'] )
+      	if ( array_key_exists('action', $_REQUEST) && 'save' == $_REQUEST['action'] )
 		{
 			$options = array(
 				"apitype" => $_REQUEST[apitype],
@@ -931,7 +931,7 @@
 {
 	if (function_exists('add_options_page'))
 	{
-		add_options_page('WP-Status.net', 'WP-Status.net', 0, basename(__FILE__), 'wpstatusnet_options');
+		add_options_page('WP-Status.net', 'WP-Status.net', 'manage_options', basename(__FILE__), 'wpstatusnet_options');
     	}
 }

Vastaa viestiin sen kontekstissa (WordPress Support Forums)

You’re probably hitting a WordPress bug in get_search_form()

20. huhtikuuta 2012 klo 20.04
Sijainti: Muut: Stack Overflow
Avainsanat: WordPress

If your theme has a searchform.php, you’re probably hitting Ticket #16541get_search_form() ignores $echo if searchform.php exists.

Your workaround is fine if you’re just echoing the search form anyway, but if you need to capture the output in a variable, you can work around this with output buffering:

<?php ob_start();
get_search_form();
$my_search_form = ob_get_clean(); ?>

Vastaa viestiin sen kontekstissa (Stack Overflow)

You could publish a brief spec/howto of how you create the default labels

9. huhtikuuta 2012 klo 16.31
Sijainti: Blogit: Archetyped
Avainsanat: WordPress

For the image labels, you could publish a brief spec/howto of how you create the default labels, crowdsource translated versions and then pick the right one in the code based on current locale.

But then again I think simple text instead of images would work even better. I’m not sure what you mean when you list ”Style (e.g. prev/next buttons) cannot be customized”: surely that applies to images more than text, which can be bent any which way with CSS?

Vastaa viestiin sen kontekstissa (Archetyped)

WordPress != WordPress.com

16. helmikuuta 2012 klo 19.58
Sijainti: Blogit: Kehitys kehittyy
Avainsanat: Drupal, WordPress

Köhöm, WordPress != WordPress.com (mikäli ulkopuolisella alustalla jälkimmäiseen viitattiin).

Mutta asiaan: onko tuo looginen captcha yleisessä jakelussa oleva Drupal-lisäosa vai talon sisällä kehitelty? Onko se tehokas? Kiinnostaa, koska se on täysin suomenkielisenä poikkeuksellisen käyttäjäystävällinen.

Vastaa viestiin sen kontekstissa (Kehitys kehittyy)

Inserting newlines

6. tammikuuta 2012 klo 19.46
Sijainti: Keskustelupalstat: WordPress Support Forums
Avainsanat: WordPress

There was a topic about replacing br tags with newlines on Urban Giraffe, but it seems to have led nowhere, so I’m posting this here just so that I can find it when I again need it, and maybe of help to others too.

I modified the search_and_replace function on line 37 of models/search.php so that $this->replace is assigned a replaced string itself:

$this->replace = str_replace("\\n", '
', $replace);

This means I want to replace any occurences of ”\n”’s in my replacement string with actual newlines just prior to applying the replacement.

It’s an ad hoc solution which I’m reverting once I’m done with newlines. I’ve not explored any possible side effects this solution may have, so use with caution.

Edit: Forum ate my br.

Vastaa viestiin sen kontekstissa (WordPress Support Forums)

Settings keep resetting

13. syyskuuta 2011 klo 15.38
Sijainti: Keskustelupalstat: WordPress Support Forums
Avainsanat: WordPress

Is it just me, or do the plugin’s settings get reset back to defaults with each update? Is this intentional and if so, why?

Vastaa viestiin sen kontekstissa (WordPress Support Forums)

« Uudempia - Vanhempia »