Put this in a bash script and execute it:
#!/bin/bash wget -X /PATH/TO/WP_ROOT/wp-content/uploads -r -nH -nc ftp://FTP_USER:FT_PPW@FTP_HOST//WP_ROOT
Things related to the WordPress CMS
Put this in a bash script and execute it:
#!/bin/bash wget -X /PATH/TO/WP_ROOT/wp-content/uploads -r -nH -nc ftp://FTP_USER:FT_PPW@FTP_HOST//WP_ROOT
To prevent perpetual login redircet loops in local/development WordPress installations add this function to your wp-config.php (have it return the users ID you want to authenticate):
function wp_validate_auth_cookie($cookie='',$scheme='') { return 1; // admin user id }
# add to functions.php of your theme function the_title_trim($title) { $title = attribute_escape($title); $findthese = array( '#Protected:#', '#Private:#' ); $replacewith = array( '', // What to replace "Protected:" with '' //What to replace "Private:" with ); $title = preg_replace($findthese, $replacewith, $title); return $title; } add_filter('the_title', 'the_title_trim');
preg_replace("/\/\w*?\.css/", "/", get_stylesheet_uri());
Gibt den Pfad des aktiven Themes zurück, auch wenn dies ein Child-Theme ist. Vorrausgesetzt, das Child Stylesheet ist mit WordPress Bordmitteln im Theme eingebunden und aktiviert.
Returns the path of the actual active theme, even if this is a child theme. This only works if the child themes stylesheet is included with WordPress methods.
Return value comes with trailing Slash!!
Disable FTP requirement for Pluing Installations and Updates / FTP Anforderung für Plugin und Updateinstallation deaktivieren:
//add to wp-config.php define('FS_METHOD','direct');
<?php if (count(query_posts('author='.get_current_user_id().'&posts_per_page=5')) > 0) { //User hat posts / User has posts } else { //User hat KEINE posts / User has NO posts } ?>
Pfad zum Plugin in WordPress / Path to plugin in WordPress
plugins_url()."/[PluginDirectoryName]"
site_url(); bloginfo("wpurl"); //check this!
Returns Root Domain URL without trailing slash.
home_url();
Returns URL of the WordPress Home target without trailing slash. Usually is the same as the root domain, but needn’t be!
admin_url();
Returns the URL leading to the WP Admin directory including trailing slash. URLs in WordPress weiterlesen
Das hier in die functions.php des aktiven Themes eintragen / Add this to the active themes functions.php:
add_filter( 'auto_update_translation', '__return_false' );
Das Internet ist voll von freien Webredaktionssystemen, die auf PHP und MySQL basieren. Auch deren Verwendung ist allgegenwärtig. Unter diesen Redaktionssystemen nimmt WordPress jedoch eine Ausnahmestellung ein. Mit einer expotentiell wachsenden atemberaubenden Zahl von inzwischen über 140 Millionen aktiven Installationen betreibt das WordPress Redaktionssystem inzwischen etwa ein Drittel des gesamten Web.
Wenn auch die zugrundeliegende Softwarearchitektur von WordPress mitunter, wie viele seiner Pedants, wie z.B. Typo3, historisch gewachsen ist, so ist die sehr einfache Handhabung und Flexibilität von WordPress im Vergleich zu anderen Systemen nicht von der Hand zu weisen. Ganz sicher hat das WordPress Projekt seinen Erfolg diesem Pragmatismus zu verdanken.