How do I display image files as links?

There’s no such “non-coding newbie”-bulk-thing for the process. You have to do that for each of the image, when you are uploading the image to the site and/or post/page. On the right panel of the media upload pane, change “Link To” to “Custom URL” and put the URL (whatever you like – internal or external) … Read more

Run filter if only it was run from specific admin page ( ‘upload_dir’ changed )

Adding filter: add_filter( ‘upload_dir’, ‘change_upload_dir’, 10, 1 ); Function content: function change_upload_dir($param) { // Check for REFER $actual_page = $_SERVER[‘HTTP_REFERER’]; parse_str( parse_url($actual_page, PHP_URL_QUERY), $query_array ); if ( strpos($actual_page, ‘plugin_name.php’) ) { $mydir=”/customdir”; $param[‘path’] = $param[‘basedir’] . $mydir; } return $param; } Hope this will help Other ideas, based not on HTTP_REFERER, are appreciated 🙂

Elegant way to signify inheritance and relationship between posts

Using the Posts 2 Posts Module which is still being developed just no support is being offered except through the git fork. How to use it. function my_connection_types() { p2p_register_connection_type( array( ‘name’ => ‘posts_to_pages’, ‘from’ => ‘post_type_1’, ‘to’ => ‘post_type_2’, ‘cardinality’ => ‘one-to-many’ ) ); } add_action( ‘p2p_init’, ‘my_connection_types’ ); The above example will create … Read more

Post Type Upload Directory – {post_type}_upload_dir filter

‘apply_filters’ runs the value through all of the other hooks / functions attached to it. Try an experiment: print_r( $type ); print_r( apply_filters(“{$type}_upload_directory”, $type) ); While you might, in your case, get the same thing – the apply_filters makes sure that any other plugins that try to influence this upload directory will still work.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)