do_action example


function wp_print_scripts( $handles = false ) {
    global $wp_scripts;

    /** * Fires before scripts in the $handles queue are printed. * * @since 2.1.0 */
    do_action( 'wp_print_scripts' );

    if ( '' === $handles ) { // For 'wp_head'.         $handles = false;
    }

    _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );

    if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
        if ( ! $handles ) {
            return array(); // No need to instantiate if nothing is there.         }
    }
            /* translators: %s: Site title. */
            printf( __( 'Links for %s' )esc_attr( get_bloginfo( 'name', 'display' ) ) );
        ?> </title> <dateCreated><?php echo gmdate( 'D, d M Y H:i:s' ); ?> GMT</dateCreated> <?php         /** * Fires in the OPML header. * * @since 3.0.0 */
        do_action( 'opml_head' );
        ?> </head> <body> <?php if ( empty( $link_cat ) ) {
    $cats = get_categories(
        array(
            'taxonomy'     => 'link_category',
            'hierarchical' => 0,
        )
    );
}
if ( ! $autosave_is_different && $old_autosave ) {
            // Nothing to save, return the existing autosave.             return $old_autosave->ID;
        }

        if ( $old_autosave ) {
            $new_autosave['ID']          = $old_autosave->ID;
            $new_autosave['post_author'] = $user_id;

            /** This filter is documented in wp-admin/post.php */
            do_action( 'wp_creating_autosave', $new_autosave );

            // wp_update_post() expects escaped array.             return wp_update_post( wp_slash( $new_autosave ) );
        }

        // Create the new autosave as a special post revision.         return _wp_put_post_revision( $post_data, true );
    }

    /** * Prepares the revision for the REST response. * * @since 5.0.0 * @since 5.9.0 Renamed `$post` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Post $item Post revision object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response Response object. */
<?php /** * Fires inside the post editor form tag. * * @since 3.0.0 * * @param WP_Post $post Post object. */
do_action( 'post_edit_form_tag', $post );

$referer = wp_get_referer();
?> > <?php wp_nonce_field( $nonce_action ); ?> <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID; ?>" /> <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" /> <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ); ?>" /> <input type="hidden" id="referredby" name="referredby" value="

        do_action( 'begin_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id$size );

        if ( in_the_loop() ) {
            update_post_thumbnail_cache();
        }

        $html = wp_get_attachment_image( $post_thumbnail_id$size, false, $attr );

        /** * Fires after fetching the post thumbnail HTML. * * @since 2.9.0 * * @param int $post_id The post ID. * @param int $post_thumbnail_id The post thumbnail ID. * @param string|int[] $size Requested image size. Can be any registered image size name, or * an array of width and height values in pixels (in that order). */


    /** * Fires after a taxonomy is registered. * * @since 3.3.0 * * @param string $taxonomy Taxonomy slug. * @param array|string $object_type Object type or array of object types. * @param array $args Array of taxonomy registration arguments. */
    do_action( 'registered_taxonomy', $taxonomy$object_type(array) $taxonomy_object );

    /** * Fires after a specific taxonomy is registered. * * The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key. * * Possible hook names include: * * - `registered_taxonomy_category` * - `registered_taxonomy_post_tag` * * @since 6.0.0 * * @param string $taxonomy Taxonomy slug. * @param array|string $object_type Object type or array of object types. * @param array $args Array of taxonomy registration arguments. */


require_once ABSPATH . 'wp-admin/includes/meta-boxes.php';

add_meta_box( 'linksubmitdiv', __( 'Save' ), 'link_submit_meta_box', null, 'side', 'core' );
add_meta_box( 'linkcategorydiv', __( 'Categories' ), 'link_categories_meta_box', null, 'normal', 'core' );
add_meta_box( 'linktargetdiv', __( 'Target' ), 'link_target_meta_box', null, 'normal', 'core' );
add_meta_box( 'linkxfndiv', __( 'Link Relationship (XFN)' ), 'link_xfn_meta_box', null, 'normal', 'core' );
add_meta_box( 'linkadvanceddiv', __( 'Advanced' ), 'link_advanced_meta_box', null, 'normal', 'core' );

/** This action is documented in wp-admin/includes/meta-boxes.php */
do_action( 'add_meta_boxes', 'link', $link );

/** * Fires when link-specific meta boxes are added. * * @since 3.0.0 * * @param object $link Link object. */
do_action( 'add_meta_boxes_link', $link );

/** This action is documented in wp-admin/includes/meta-boxes.php */
            endif;

            /** * Fires at the end of the delete users form prior to the confirm button. * * @since 4.0.0 * @since 4.5.0 The `$user_ids` parameter was added. * * @param WP_User $current_user WP_User object for the current user. * @param int[] $user_ids Array of IDs for users being deleted. */
            do_action( 'delete_user_form', $current_user$user_ids );
            ?> <input type="hidden" name="action" value="dodelete" /> <?php submit_button( __( 'Confirm Deletion' ), 'primary' ); ?> <?php else : ?> <p><?php _e( 'There are no valid users selected for deletion.' ); ?></p> <?php endif; ?> </div><!-- .wrap --> </form><!-- #updateusers -->

    }

    /** * Fires after processing the post data for bulk edit. * * @since 6.3.0 * * @param int[] $updated An array of updated post IDs. * @param array $shared_post_data Associative array containing the post data. */
    do_action( 'bulk_edit_posts', $updated$shared_post_data );

    return array(
        'updated' => $updated,
        'skipped' => $skipped,
        'locked'  => $locked,
    );
}

/** * Returns default post information to use when populating the "Write Post" form. * * @since 2.0.0 * * @param string $post_type Optional. A post type string. Default 'post'. * @param bool $create_in_db Optional. Whether to insert the post into database. Default false. * @return WP_Post Post object containing all the default post data as attributes */


                    /** * Fires when an error happens rescheduling a cron event. * * @since 6.1.0 * * @param WP_Error $result The WP_Error object. * @param string $hook Action hook to execute when the event is run. * @param array $v Event data. */
                    do_action( 'cron_reschedule_event_error', $result$hook$v );
                }
            }

            $result = wp_unschedule_event( $timestamp$hook$v['args'], true );

            if ( is_wp_error( $result ) ) {
                error_log(
                    sprintf(
                        /* translators: 1: Hook name, 2: Error code, 3: Error message, 4: Event data. */
                        __( 'Cron unschedule event error for hook: %1$s, Error code: %2$s, Error message: %3$s, Data: %4$s' ),
                        $hook,
                        
public function display() {
        wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
        ?> <div class="tablenav top themes"> <div class="alignleft actions"> <?php                 /** * Fires in the Install Themes list table header. * * @since 2.8.0 */
                do_action( 'install_themes_table_header' );
                ?> </div> <?php $this->pagination( 'top' ); ?> <br class="clear" /> </div> <div id="availablethemes"> <?php $this->display_rows_or_placeholder(); ?> </div> <?php
// WordPress Events and News.     wp_add_dashboard_widget( 'dashboard_primary', __( 'WordPress Events and News' ), 'wp_dashboard_events_news' );

    if ( is_network_admin() ) {

        /** * Fires after core widgets for the Network Admin dashboard have been registered. * * @since 3.1.0 */
        do_action( 'wp_network_dashboard_setup' );

        /** * Filters the list of widgets to load for the Network Admin dashboard. * * @since 3.1.0 * * @param string[] $dashboard_widgets An array of dashboard widget IDs. */
        $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() );
    } elseif ( is_user_admin() ) {

        

        do_action( 'customize_render_partials_before', $this$partials );

        set_error_handler( array( $this, 'handle_error' )error_reporting() );

        $contents = array();

        foreach ( $partials as $partial_id => $container_contexts ) {
            $this->current_partial_id = $partial_id;

            if ( ! is_array( $container_contexts ) ) {
                wp_send_json_error( 'malformed_container_contexts' );
            }

            
$wp_sitemaps->init();

        /** * Fires when initializing the Sitemaps object. * * Additional sitemaps should be registered on this hook. * * @since 5.5.0 * * @param WP_Sitemaps $wp_sitemaps Sitemaps object. */
        do_action( 'wp_sitemaps_init', $wp_sitemaps );
    }

    return $wp_sitemaps;
}

/** * Gets an array of sitemap providers. * * @since 5.5.0 * * @return WP_Sitemaps_Provider[] Array of sitemap providers. */
function wpmu_update_blogs_date() {
    $site_id = get_current_blog_id();

    update_blog_details( $site_id, array( 'last_updated' => current_time( 'mysql', true ) ) );
    /** * Fires after the blog details are updated. * * @since MU (3.0.0) * * @param int $blog_id Site ID. */
    do_action( 'wpmu_blog_updated', $site_id );
}

/** * Gets a full site URL, given a site ID. * * @since MU (3.0.0) * * @param int $blog_id Site ID. * @return string Full site URL if found. Empty string if not. */
function get_blogaddress_by_id( $blog_id ) {
    
Home | Imprint | This part of the site doesn't use cookies.