Wpplugin

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

get_the_title() and get_the_content() scot informatii ca $post doar ca ..

scot ce e

dupa toate pluginurile nu ce o bagat user in admin.

$post: A global WordPress variable containing informa on about the currently processed post. get_permalink($post_id): Returns the full URL to the post given by its ID (for example $post->ID). function_exists($function): Helps the PHP funcon to check if the given funcon exists. It is useful in themes when we want to include our funcon. urlencode($string): Helps the PHP funcon to properly format the parameters to be used in a URL query. Filter Descripon the_content Applied to the post content retrieved from the database prior to prinng on the screen the_content_rss Applied to the post content prior to including in an RSS feed the_title Applied to the post tle retrieved from the database prior to prinng on the screen wp_title Applied to the blog page tle before sending to the browser in the wp_title funcon comment_text Applied to the comment text before display on the screen by the comment_text funcon and in the admin menus get_categories Applied to the category list generated by the get_categories funcon the_permalink Applied to the permalink URL for a post prior to prinng by the_permalink funcon autosave_interval Applied to the interval for auto-saving posts theme_root_uri Applied to the theme root directory URI returned by the get_theme_root_uri funcon pag 48

Filter hooks can be removed using the remove_filter() func on. It accepts the same arguments as add_filter(), and is useful if you want to replace some of the exisng WordPress filters with your funcons. If you want to take a closer look at the default WordPress filters, you can find them in the wp-includes\default-filters.php file of your WordPress installaon. Ac hooks are used in a way similar to the filter hooks. The syntax for se on ng up an acon hooks is:
add_action ( 'action_hook', 'action_function_name', [priority], [accepted_args] ); action_hook: The name of the hook provided by WordPress. action_function_name: The name of the funcon you want to use to handle

the event. priority: An oponal parameter, which specifies the execuon order of funcons. The default value is 10. If several funcons apply to the same filter hook, then funcons with lower priority numbers will execute first, while the funcons with the same priority will execute in the order in which they were added.

accepted_args: It is oponal and specifies how many arguments your funcon

can accept. The default value is 1 and is used for hooks that pass more than one argument.
Acon Descripon create_category Runs when a new category is created publish_post Runs when a post is published, or if it is edited and its status is published wp_blacklist_check Runs to check whether a comment should be blacklisted switch_theme Runs when the blog's theme is changed activate_(plugin_file_name) Runs when the plugin is first acvated admin_head Runs in the HTML <head> secon of the admin panel wp_head Runs when the template calls the wp_head funcon. This hook is generally placed near the top of a page template between <head> and </head> init Runs a er WordPress has finished loading but before any headers are sent; it is useful for intercepng $_GET or $_POST triggers user_register Runs when a user's profile is first created

You might also like