nelsonkoehn
Forum Replies Created
-
Forum: Plugins
In reply to: [SlimStat Analytics] Access Log Page Title as /-/-/-/-/-/-/-/-/-/-My site is a low traffic site. I must have had a string of malware requesting that url from a number of different global ip’s. That title has not come thru now for several days.
If i deactivate the page title option that url still shows as the url.
I’ll continue to watch,
Thanks
Forum: Alpha/Beta/RC
In reply to: Admin Interface and Post TypesNo, dumb me. This is in the Beta forum. Looked at the patch and seen it was
@since 3.0.0
so assumed that was included in 3.0.1. Added the patch intopost.php
andmenu.php
. Working great. I +1 this in the future.Forum: Alpha/Beta/RC
In reply to: Admin Interface and Post TypesCan’t seem to wrap my self around this one
function ms_create_post_type() { register_post_type('ms_product', array( .... 'show_ui' => true, 'show_in_menu' => false, .... )); }
should take
ms-product
out of a menu, right?
Andadd_action('admin_menu', 'ms_create_admin_menu'); function ms_create_admin_menu() { add_menu_page('My Shop', 'My Shop', 'manage_options', 'my-shop', 'my_shop_order_log', MS_PLUGIN_URL . '/images/ms_icon.png'); } add_action( 'init', 'ms_create_post_type' ); function ms_create_post_type() { register_post_type('ms_product', array( .... 'show_ui' => true, 'show_in_menu' => 'my-shop', .... )); }
should put
ms-product
under my custom menu?
Or do I not understand$parent
?Forum: Alpha/Beta/RC
In reply to: Admin Interface and Post TypesRead thru the Adding_Administration_Menus again and paid attention to this
function
The function that displays the page content for the menu page.Technically, as in the add_menu_page function, the function parameter is optional, but if it is not supplied, then WordPress will basically assume that including the PHP file will generate the administration screen, without calling a function. Most plugin authors choose to put the page-generating code in a function within their main plugin file.
Played around a little and got this to work
add_object_page('My Shop', 'My Shop', 'manage_options', 'my-shop-order-log', '', MS_PLUGIN_URL . '/images/ms_icon.png'); add_submenu_page('my-shop-order-log', 'Products', 'Products', 'manage_options', 'edit.php?post_type=ms_product'); add_submenu_page('my-shop-order-log', 'Add New Products', 'Add New Products', 'manage_options', 'post-new.php?post_type=ms_product'); add_submenu_page('my-shop-order-log', 'Categories', 'Categories', 'manage_options', 'edit-tags.php?taxonomy=category&post_type=ms_product'); add_submenu_page('my-shop-order-log', 'Settings', 'Settings', 'manage_options', 'my-shop-settings', 'my_shop_setting');
Now if I can just turn of the post ui without shutting this down it will work fine
Minkowski, have you tried something down this line?
Forum: Alpha/Beta/RC
In reply to: Admin Interface and Post TypesBeen looking around for something down this line myself. I see where you can add a sub menu under your custom post type but I want my custom post type under my own main menu page.
Found this in the codex.
Here’s an example of adding an option page under a custom post type menu block:
<?php add_submenu_page('edit.php?post_type=wiki', 'Options', 'Options', 'manage_options', 'wiki-options', array(&$this, 'options_page') ); ?>
but that goes the opposite way I need it.
Forum: Plugins
In reply to: Method to update $post_title and $post_name for custom post$_POST['_title']
and$_POST['_event']
are custom fields from a custom post type of events. A lot of my events have the same title so did not want this in the title line but a combination of event title and event date. (My main title box is hidden). I want it this way so in the list view of my custom posts I have the combination title/date in the title column so that the link works to the edit post and also hasEdit|Quick Edit|Trash|View
available.
I did have a typo in my code above so that it didn’t make a lot of sense
$my_post_title = $name;
should be changed to
$my_post_title = $name . "-" . $date;
It appears as if changing$title_to_ignore
to$my_post_title
has fixed the issue of submit vs publish. This also will return the original string other than on my custom post type, right?Forum: Plugins
In reply to: Method to update $post_title and $post_name for custom postWanting to do the same thing and followed your lead. Thought it was working until it changed my ‘Publish’ button to a ‘Submit for Review’ button even for the administrator. Also I cannot move my custom post type to the trash, it will not delete. Commented out my
add_filter
line and now buttons and trash work right but no title.
This is the code I am using.add_filter('title_save_pre', 'my_event_save_title'); function my_event_save_title($title_to_ignore) { if ($_POST['post_type'] == 'my_event') : $date = date('m-d-y',strtotime($_POST['_date'])); $name = $_POST['_title']; $my_post_title = $name; endif; return $my_post_title; }
Have you noticed this or do you have any ideas
Forum: Plugins
In reply to: Show comments not only on Pages and single PostsSee the little part of the line
$withcomments
. In your template that you want the comments in add$withcomments=true;
.Forum: Themes and Templates
In reply to: Current User RoleI did a little more digging and it looks as if you can use this. I was having a conflict with Role Scoper.