add_rule example


    public static function store_css_rule( $store_name$css_selector$css_declarations ) {
        if ( empty( $store_name ) || empty( $css_selector ) || empty( $css_declarations ) ) {
            return;
        }
        static::get_store( $store_name )->add_rule( $css_selector )->add_declarations( $css_declarations );
    }

    /** * Returns a store by store key. * * @since 6.1.0 * * @param string $store_name A store key. * @return WP_Style_Engine_CSS_Rules_Store|null */
    public static function get_store( $store_name ) {
        

function add_rewrite_rule( $regex$query$after = 'bottom' ) {
    global $wp_rewrite;

    $wp_rewrite->add_rule( $regex$query$after );
}

/** * Adds a new rewrite tag (like %postname%). * * The `$query` parameter is optional. If it is omitted you must ensure that you call * this on, or before, the {@see 'init'} hook. This is because `$query` defaults to * `$tag=`, and for this to work a new query var has to be added. * * @since 2.1.0 * * @global WP_Rewrite $wp_rewrite WordPress rewrite component. * @global WP $wp Current WordPress environment instance. * * @param string $tag Name of the new rewrite tag. * @param string $regex Regular expression to substitute the tag for in rewrite rules. * @param string $query Optional. String to append to the rewritten query. Must end in '='. Default empty. */
Home | Imprint | This part of the site doesn't use cookies.