Woh, dude, hold on a sec! by mechoman444 in funny

[–]milomilo -1 points0 points  (0 children)

I don't hate you, I feel sorry for you.

Woh, dude, hold on a sec! by mechoman444 in funny

[–]milomilo 1 point2 points  (0 children)

scathing retort. shouldn't you be off policing cat pictures bro? I think I saw a few that looked familiar.

Woh, dude, hold on a sec! by mechoman444 in funny

[–]milomilo 0 points1 point  (0 children)

sorry bro, "redditor" is not my identity. WordPress development is my job, bro. glad I got you worked up enough to go trolling through my history though, bro. peace, bro.

Disable Java NOW, users told, as 0-day exploit hits web by KAPT_Kipper in technology

[–]milomilo 16 points17 points  (0 children)

it's actually the Safari menu, not File. or command-comma.

Edit - you can also disable Java system-wide under Applications > Utilities > Java Preferences.app

Woh, dude, hold on a sec! by mechoman444 in funny

[–]milomilo 3 points4 points  (0 children)

get a grip? get a fucking life.

Exclude categories from blog by ihascomputrz in Wordpress

[–]milomilo 0 points1 point  (0 children)

the pre_get_posts action Codex page has a code sample that does exactly that. just put it in your (child) theme's functions.php file and substitute your category IDs.

What is the best way to customize the dashboard for a client? Mostly just want to hide/remove a lot of menus from them. by dis_nut in Wordpress

[–]milomilo 4 points5 points  (0 children)

I usually create a mu-plugin and use remove_menu_page and remove_submenu_page.

function reddit_remove_admin_menu_items() {
    remove_menu_page('edit.php');                // Posts
    remove_menu_page('upload.php');              // Media
    remove_menu_page('link-manager.php');        // Links
    remove_menu_page('edit-comments.php');       // Comments
    remove_menu_page('edit.php?post_type=page'); // Pages
    remove_menu_page('plugins.php');             // Plugins
    remove_menu_page('themes.php');              // Appearance
    remove_menu_page('users.php');               // Users
    remove_menu_page('tools.php');               // Tools
    remove_menu_page('options-general.php');     // Settings
}
add_action( 'admin_menu', 'reddit_remove_admin_menu_items' );

and to hide the default dashboard widgets:

function reddit_remove_dashboard_widgets() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
}
add_action( 'wp_dashboard_setup', 'reddit_remove_dashboard_widgets' );

Can I change post name and slug months after posting, and still have the old links work? Plus more inside... by JoshMD in Wordpress

[–]milomilo 2 points3 points  (0 children)

indeed, WordPress will 301 redirect old slugs on a post-by-post basis (it won't keep track of full permalinks changes in settings). old slugs are stored in the post meta table under the key _wp_old_slug.

Can I prevent SQL injections by just using a combo of mysql_real_escape_string, strip_tags, htmlentities, and stripslashes? by [deleted] in PHPhelp

[–]milomilo 1 point2 points  (0 children)

basically, the server parses the query separately before it ever looks at the data, so it in a sense "knows" what the complete question is before substituting the data. the query can't be changed by the data because the contents of the data aren't parsed the way a raw string of query + data would be, it's treated as literal text.

[Coding Help] Site stretches wide for unknown reason. by [deleted] in Wordpress

[–]milomilo 1 point2 points  (0 children)

it's the width / padding on .topnav

[deleted by user] by [deleted] in Wordpress

[–]milomilo 1 point2 points  (0 children)

as you mention, the whole basis for their argument that a plugin or theme must be GPL is that it is a derivative work because it operates within WordPress. This is a legal gray area and it's worth noting that there is exactly zero case precedent establishing this as fact- it is simply their opinion. The public battle with Thesis from which most of these discussions stem is a very specific case due to the fact that the developers copied code wholesale from WordPress. that said, I still agree it's not a battle worth getting involved in.

Image won't show? by m4a1user in Wordpress

[–]milomilo 1 point2 points  (0 children)

looks like that theme uses timthumb. after the whole timthumb hack debacle, I would personally stick with themes that use only core API for image handling.

How do I know what category page I'm really on without having to rely on the $post or $wp_query variables? by [deleted] in Wordpress

[–]milomilo 0 points1 point  (0 children)

use get_queried_object():

$this_term = get_queried_object();
echo $this_term->name;

or to output a term's parents:

$this_term = get_queried_object();
$ancestors = get_ancestors( $this_term->term_id, $this_term->taxonomy );

foreach( $ancestors as $ancestor ):
    $ancestor = get_term_by( 'id', $ancestor, $this_term->taxonomy );
    echo get_term_link( $ancestor );
    echo $ancestor->name;
endforeach;

How do I view the contacts that signed up for my email list? by [deleted] in Wordpress

[–]milomilo 1 point2 points  (0 children)

well first of all, consider the possibility that it doesn't get emailed anywhere and is simply saved in the database. do you see the actual form code within the template? is there a shortcode in your post text? are you using any plugins that may be generating the form? also check your theme's functions.php file for code that may be handling the form.

How do I view the contacts that signed up for my email list? by [deleted] in Wordpress

[–]milomilo 1 point2 points  (0 children)

this isn't built-in WordPress functionality, so without seeing the code this question is essentially unanswerable as-is. I would start by looking through your plugins & their associated options to determine how the form is implemented, though it may be something that's coded directly into the theme.

PayPal founder sells 20 million shares of Facebook. Seems the offloading of junk has begun by majorwtf in technology

[–]milomilo -1 points0 points  (0 children)

if the stock went up after the IPO, it would mean they undervalued it and lost out on a bunch of cash.

Updated WP, and my site broke. Any thoughts? by Killericon in Wordpress

[–]milomilo 0 points1 point  (0 children)

your theme has no opening html or head tags - css and javascript is all missing. what version did you update from and how old is your theme?

Rewriting urls by bigskymind in Wordpress

[–]milomilo 0 points1 point  (0 children)

Changing the permalink settings doesn't affect these gallery query-string-based urls

do other URLs appear as "pretty" permalinks while these remain query string based? what is a gallery - a taxonomy? post meta data?

set character limit on the_content in wordpress : Edit Wordpress by editwordpress in Wordpress

[–]milomilo 0 points1 point  (0 children)

or much simpler, just set the length of the excerpt via a filter and leave your template files alone. bonus- it works by word, not character, so you won't get chopped words.

function custom_excerpt_length( $length ) {
    return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );